I am trying to send email using Exchange 2007 from a console app using the following code and I get this error message in the exception that gets thrown on the Send call.
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated
MailMessage message = new MailMessage();
message.From = new MailAddress("[email protected]");
message.To.Add("[email protected]");
message.Subject = "test";
SmtpClient smtp = new SmtpClient(ConfigurationUtil.SMTPServer);
smtp.Credentials = new System.Net.NetworkCredential("[email protected]", "password");
smtp.Send(message);
This worked on Exchange 2003.