G
Guest
I am working with three computers, my developing computer, a Web Server and a
Mail Server (Exchange).
I am trying to send a email from the Web Server via the Mail Server to a
valid email address with this code:
MailMessage msgMail = new MailMessage();
msgMail.To = "(e-mail address removed)";
msgMail.From = "(e-mail address removed)";
msgMail.Subject = "Mail Example Subject";
msgMail.Body = "MAIL EXAMPLE BODY";
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);
Which does not work.
My biggest problem is that everything works perfectly on my developing
computer when I try to send mail via the Mail Server with the same code.
Why can't I send mail from the Web Server?
Mail Server (Exchange).
I am trying to send a email from the Web Server via the Mail Server to a
valid email address with this code:
MailMessage msgMail = new MailMessage();
msgMail.To = "(e-mail address removed)";
msgMail.From = "(e-mail address removed)";
msgMail.Subject = "Mail Example Subject";
msgMail.Body = "MAIL EXAMPLE BODY";
SmtpMail.SmtpServer = "[Server Name]";
SmtpMail.Send(msgMail);
Which does not work.
My biggest problem is that everything works perfectly on my developing
computer when I try to send mail via the Mail Server with the same code.
Why can't I send mail from the Web Server?