【发布时间】:2011-07-23 15:51:11
【问题描述】:
我已经用 .Net 平台开发了一个应用程序。我的问题是:当我尝试向客户发送激活密码时,出现以下错误。
连接尝试失败,因为连接方没有 一段时间后正确响应,或建立连接 失败,因为连接的主机未能响应 xxx.xxx.xxx.xxx:25
这是我的代码:
<system.net>
<mailSettings>
<smtp from="username@server.com">
<network host="smtp.server.com" password="xxx" userName="JohnSmith" />
</smtp>
</mailSettings>
</system.net>
【问题讨论】:
-
您检查过您的 SMTP 设置正确性吗?密码?用户名?
-
防火墙是否会阻止端口 25 上的传出连接?
-
是的,可能是防火墙或病毒扫描程序阻止了 smtp 连接尝试,请先检查
-
好的,我会检查我的防火墙。