GMail SMTP via C# .Net errors on all ports

前端 未结 7 1607
鱼传尺愫
鱼传尺愫 2020-11-27 17:35

I\'ve been trying for a whlie on this, and have so far been failing miserably. My most recent attempt was lifted from this stack code here: Sending email through Gmail SMT

7条回答
  •  感动是毒
    2020-11-27 17:39

    I tried your code, and it works prefectly with port 587, but not with 465.

    Have you checked the fire wall? Try from the command line "Telnet smtp.gmail.com 587" If you get "220 mx.google.com ESMTP...." back, then the port is open. If not, it is something that blocks you call.

    Daniel

提交回复
热议问题