我正在开发与vb2005,使用system.net.mail发送邮件使用谷歌配置。我的代码一个完整的样品posted here早期system.net.mail不发送邮件
With smtp
.Host = "smtp.google.com"
.Port = 465
.UseDefaultCredentials = False
.Credentials = New System.Net.NetworkCredential(mygoogleemail, mypass)
.EnableSsl = true
.Timeout = 60000
End With
我得到的操作超时。如果我改变端口为587,它说the server does not support secure connection
[编辑] 防火墙可以阻止它吗?
是否有指定发送应用程序名称?
谷歌将不会让你使用它的SMTP服务器发送垃圾邮件重试。将超时时间增加至少5分钟。尝试gmail.com主机。 – 2011-03-13 14:45:00
@Hans Passant只用1封电子邮件测试我的应用程序,并且它不发送 – Smith 2011-03-13 15:42:52