我使用XAMPP 1.8.0中包含Apache 2.4.2,5.4.5 PHP和MySQL 5.5升级我的本地服务器。 我通过运行MercuryMail发送邮件使用PHP mail()函数,但在我的收件箱收到任何电子邮件。
当我和Mozilla Thunderbird中测试发送邮件的工作。 和邮件()功能似乎并没有发出错误地工作。
\ XAMPP \ PHP:我在XAMPP安装路径d检查php.ini中 。 我看到了下面这样
[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
; SMTP = localhost
; smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
; sendmail_from = postmaster@localhost
; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesD:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
; sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\xampp\mailoutput folder
; sendmail_path = "D:\xampp\mailtodisk\mailtodisk.exe"
我调整的SMTP设置某种组合。
我注释掉主机和端口
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP = localhost
smtp_port = 25
我注释掉sendmail_path,但没有奏效。 邮件无法发送。
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"
同样,我注释掉anothor sendmail_path与mailToDisk工作
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\xampp\mailoutput folder
sendmail_path = "D:\xampp\mailtodisk\mailtodisk.exe"
这似乎工作,但在收件箱中收到任何邮件。 在没有找到d:\ XAMPP \ mailoutput
在PHP的邮件日志(d:\ XAMPP \ PHP \日志\ php_mail.log),我发现这很可能说是邮件发送一些日志行。
mail() on [D:\xampp\htdocs\....:127]: To: sithu@localhost.com -- Headers: MIME-Version: 1.0 Content-type: text/html; charset=text/html Return-Path:Sithu <stk@localhost.com> From: Sithu <stk@localhost.com> Reply-To: Sithu <stk@localhost.com>
mail() on [D:\xampp\htdocs\....:127]: To: test@localhost.com -- Headers: MIME-Version: 1.0 Content-type: text/html; charset=text/html Return-Path:admin@localhost.com From: admin@localhost.com Reply-To: admin@localhost.com
mail() on [D:\xampp\htdocs\....:127]: To: test@localhost.com -- Headers: MIME-Version: 1.0 Content-type: text/html; charset=text/html Return-Path:Members <admin@localhost.com> From: Members <admin@localhost.com> Reply-To: Members <admin@localhost.com>
我也试着注释掉sendmail_from,但没有运气。
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = postmaster@localhost
任何配置我仍下落不明?
[编辑]
水星邮件服务器正在运行。
每当我更新php.ini中 ,我重新启动Apache服务器。