Unable to send email to other domains using System.Net.Mail.SmtpClient

后端 未结 1 1357
长发绾君心
长发绾君心 2021-01-27 13:48

Please look at the following code:

client.Credentials = new NetworkCredential(SMTP_SERVER_USERNAME, SMTP_SERVER_PASSWORD);
client.EnableSsl = false;
client.Host          


        
1条回答
  •  春和景丽
    2021-01-27 14:26

    I noticed your message.To.Add(RECIPIENT_ADDRESS) might have been a string. I've had issues with this in the past. Wrap it in a MailAddress object and it should work.

    0 讨论(0)
提交回复
热议问题