8
Answers

Error-Message = "The SMTP server requires a secure connection

Ramco Ramco

Ramco Ramco

2y
4.4k
1

Hi

  I am getting below error - Message = "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at"

Email.Body = BodyStr;

Email.BodyEncoding = Encoding.UTF8;
Email.IsBodyHtml = true;
Email.Priority = MailPriority.Normal;
SmtpClient sc = new SmtpClient(Result.SMTPHost, Convert.ToInt32(Result.SMTPPort));
sc.Credentials = new System.Net.NetworkCredential(Result.Email, "test");

sc.UseDefaultCredentials = false;
sc.EnableSsl = Convert.ToBoolean(Result.EnableSsl);

sc.Send(Email);

Thanks

Answers (8)