I have purchased domain from GoDaddy But site hosted in azure app service. I am trying to send mail using the business email created under the domain(xyz@domain.com). But facing error while sending using smtp rely, Is there any changes need in GoDaddy DNS ?
SmtpClient client = new SmtpClient()
{
Host = "smtp.office365.com",
EnableSsl = false,
UseDefaultCredentials = false,
Credentials = new NetworkCredential("xyz@domain.com", "password"),
Port = 587
};
Getting below error , The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [DM5PR0101CA0014.prod.exchangelabs.com]