System.Net.Mail.SmtpException: The operation has timed out. error in asp.net send mail code using godaddy hosting

前端 未结 2 2064
心在旅途
心在旅途 2020-12-17 16:45

I am using following peace of code to send mail using godaddy hosting .

but its throw System.Net.Mail.SmtpException: The operation has timed out.

相关标签:
2条回答
  • 2020-12-17 17:12

    Just Change:

    smtp.Timeout = 20000;

    To

    smtp.Timeout = 2000000;

    0 讨论(0)
  • 2020-12-17 17:21

    I think this is the famous SSL issue of System.Net.Mail

    System.Net.Mail with SSL to authenticate against port 465

    You should use some external library or wait until Microsoft include this features in a framework release

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