authentication or decryption has failed when sending mail to GMail using SSL

后端 未结 7 1773
栀梦
栀梦 2020-12-09 05:42

I\'m referring to this guide on C# SMTP mail.

Here is my code:

MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient(\"smtp.gm         


        
7条回答
  •  春和景丽
    2020-12-09 06:29

    If you're using SSL rather than TLS, you need port 465 rather than 587.

    See http://mail.google.com/support/bin/answer.py?hl=en&answer=13287.

提交回复
热议问题