【问题标题】:Mail Sending problem in .Net.Net 中的邮件发送问题
【发布时间】: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 连接尝试,请先检查
  • 好的,我会检查我的防火墙。

标签: c# asp.net


【解决方案1】:

您确定 smtp 处于活动状态并在该 IP 上运行吗?我无法通过 25 端口远程登录它

【讨论】:

  • +1 Telnet 是检查 smtp 服务器是否可用的好方法。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-28
  • 1970-01-01
  • 1970-01-01
  • 2011-09-07
  • 2017-06-05
相关资源
最近更新 更多