【问题标题】:zend-mail fails due to connected party did not properly respond由于连接方没有正确响应,zend-mail 失败
【发布时间】:2014-08-03 14:35:39
【问题描述】:

我使用 php zend-mail 发送电子邮件。在我搬到新的网络环境之前,这些代码运行良好。我使用的 php zend-mail 代码是:

$mail = new Zend_Mail('UTF-8');
$mail->addTo($toemail, "{".$toname ."}");
$mail->setSubject($subject) ; 
$mail->setFrom($reply_email, 'staff');
$mail->setBodyHTML($msg, 'UTF-8');
try {
    $mail->send();
} catch (Zend_Mail_Protocol_Exception  $e){
    $mailerr = $e->getMessage() ;
    echo  "Send mail fails : ". $mailerr . "<br>" ; 
}

由于以下错误消息,我无法在新的网络环境中发送电子邮件: "连接尝试失败,因为连接的一方在一段时间后没有正确响应,或者连接的主机没有响应,建立连接失败。"

然后我打开一个窗口 7 shell 命令窗口并尝试 ping 我的邮件服务器 pop.AAA***.com,我收到“请求超时”错误消息。然后我ping其他大域名;但奇怪的事情发生了。一些大域名在 ping 上运行良好,但有些则不行。例如:

C:\Users\Jordan>ping www.hotmail.com

Pinging dispatch.kahuna.glbdns2.microsoft.com [65.55.129.171] with 32 bytes of data:
Reply from 65.55.129.171: bytes=32 time=18ms TTL=246
Reply from 65.55.129.171: bytes=32 time=27ms TTL=246
Reply from 65.55.129.171: bytes=32 time=23ms TTL=246
Reply from 65.55.129.171: bytes=32 time=20ms TTL=246

Ping statistics for 65.55.129.171:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 18ms, Maximum = 27ms, Average = 22ms


C:\Users\Jordan>
C:\Users\Jordan>ping www.msn.com

Pinging us.co1.cb3.glbdns2.microsoft.com [131.253.13.140] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 131.253.13.140:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

在这里我们看到我可以 ping www.hotmail.com,但我无法 ping www.msn.com 或我的电子邮件服务器 pop 域。但是我可以在浏览器中访问 www.hotmail.com 和 www.msn.com。

有专家能告诉我我的zend-mail 或网络设置有什么问题吗?谢谢!

【问题讨论】:

    标签: php email networking router zend-mail


    【解决方案1】:

    一些受欢迎的网站,例如 amazon.com、microsoft.com、slashdot.org 以及过去曾遭受过 DoS 攻击的其他网站可能会在其服务器上禁用 ICMP 或设置其他网络设置来阻止接收 ping 请求或回应了。因此,在 ping 这些域名或其关联的 IP 地址时,您将收到“请求超时”。或获得“100% 丢包”。

    这是这些网站的正常行为,没有什么可以绕过它。

    【讨论】:

      猜你喜欢
      • 2019-03-18
      • 2014-11-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-27
      • 1970-01-01
      • 1970-01-01
      • 2015-07-17
      • 2013-06-13
      相关资源
      最近更新 更多