J
Jeff
I am receiving the following error:
// error: System.Net.Mail.SmtpException: The SMTP server requires a
secure connection or the client was not authenticated. The server
response was: 5.7.0 No AUTH command has been given.
How do I provide the Client Authentication with the code below.
private void SendEmail2()
{
/* create the email message */
MailMessage message = new mailMessage("(e-mail address removed)",
"(e-mail address removed)","Test email " +
DateTime.Today.ToString(),"body fo the message " );
/* create SMTP Client and add credentials */
SmtpClient smtpClient = new SmtpClient("smtp.domain.com");
/* Email with Authentication */
smtpClient.Credentials = new NetworkCredential("jwill",
"abcdef");
smtpClient.UseDefaultCredentials = false;
/*Send the message */
smtpClient.Send(message);
// error: System.Net.Mail.SmtpException: The SMTP server requires a
secure connection or the client was not authenticated. The server
response was: 5.7.0 No AUTH command has been given.
}
// error: System.Net.Mail.SmtpException: The SMTP server requires a
secure connection or the client was not authenticated. The server
response was: 5.7.0 No AUTH command has been given.
How do I provide the Client Authentication with the code below.
private void SendEmail2()
{
/* create the email message */
MailMessage message = new mailMessage("(e-mail address removed)",
"(e-mail address removed)","Test email " +
DateTime.Today.ToString(),"body fo the message " );
/* create SMTP Client and add credentials */
SmtpClient smtpClient = new SmtpClient("smtp.domain.com");
/* Email with Authentication */
smtpClient.Credentials = new NetworkCredential("jwill",
"abcdef");
smtpClient.UseDefaultCredentials = false;
/*Send the message */
smtpClient.Send(message);
// error: System.Net.Mail.SmtpException: The SMTP server requires a
secure connection or the client was not authenticated. The server
response was: 5.7.0 No AUTH command has been given.
}