使用 hMailServer 配置了SMTP服务器,
php.ini打开了所有的错误和警告信息,mail函数无任何提示信息, 对应的gmail信箱没有收到邮件。根据邮件的发送报告,smtp对邮件进行了发送,但是目标服务器没有回应php.ini配置如下:[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = [email protected]
Content-Type: text/plain; charset="utf-8"
Return-Path: <>
Message-ID: <4F0AC3E7-0B58-456E-9C08-6C4AA5E8EA4C@localhost>
Date: Wed, 13 Apr 2011 05:57:30 -0700
From: mailer-daemon@localhost
To: [email protected]
Subject: Undeliverable: We are proccessing your question as soon as possible !
Content-Transfer-Encoding: quoted-printable
X-hMailServer-LoopCount: 1Your message did not reach some or all of the intended recipients.   Sent: Wed, 13 Apr 2011 09:47:20 +0100
   Subject: We are proccessing your question as soon as possible !The following recipient(s) could not be reached:[email protected]
   Error Type: SMTP
   Connection to recipients server failed.
   Error: Host name: 74.125.127.27, message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respondTried 5 time(s)hMailServer

解决方案 »

  1.   

    你确定通过hMailServer可以正常发信吗?这已经不是php的问题了!假如你连hMailServer 发送给你的信都没有的话,那么是php 的问题!
      

  2.   

    谢谢 hnxxwyq我上面贴的发送结果应该是 hMailserver发送的吧
    如下:
    -------------------------------------------------------Content-Type: text/plain; charset="utf-8"
    Return-Path: <>
    Message-ID: <4F0AC3E7-0B58-456E-9C08-6C4AA5E8EA4C@localhost>
    Date: Wed, 13 Apr 2011 05:57:30 -0700
    From: mailer-daemon@localhost
    To: [email protected]
    Subject: Undeliverable: We are proccessing your question as soon as possible !
    Content-Transfer-Encoding: quoted-printable
    X-hMailServer-LoopCount: 1Your message did not reach some or all of the intended recipients.  Sent: Wed, 13 Apr 2011 09:47:20 +0100
      Subject: We are proccessing your question as soon as possible !The following recipient(s) could not be reached:[email protected]
      Error Type: SMTP
      Connection to recipients server failed.
      Error: Host name: 74.125.127.27, message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respondTried 5 time(s)hMailServer
      

  3.   

    收信人的服务器有问题。检查一下吧。看看是不是firewall造成的。
      

  4.   

    hMailserver需要一个真实的域名,并且这个域名要指向一个公网地址,否则一些邮件服务商是要反向解析的,如果不能正确反向解析,就认为是一个非法请求,则不响应处理,最简单的就是你用hMailserver自己测试自己的邮件,看是否能正确收到信,再说网上的真实邮件地址!
      

  5.   

    楼主试试这个http://swiftmailer.org/我觉得发邮件用这个很舒服
      

  6.   

    谢谢大家,
    最后确认问题是我购买的VPS封了25端口
    重新换了一个VPS就好了