XAMPP PHP 从本地主机发送电子邮件


XAMPP PHP sending emails from to localhost

我正在尝试从本地主机向本地主机(雷鸟帐户)发送消息,我正在按照本教程使用 XAMPP 如何使用汞....

我的 php.ini conf 是

    [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 = postmaster@localhost
; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path 

=

尽管如此,我仍然收到下一个错误

 Warning: mail(): SMTP server response: 421 Service not available, closing channel. 

我遇到了完全相同的问题!这是由于没有QUEUE文件夹引起的。所以我添加了一个名为QUEUE的文件夹,C:'xampp'MercuryMail MercuryMail 目录,这为我解决了问题!

完整路径:C:'xampp'MercuryMail'QUEUE

1.在本地主机端口 25 上安装/正确配置 SMTP 服务器2.将配置更改为指向可以连接到的其他 SMTP 服务器

此链接可能会帮助您...

http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html