apache,mercury32,php邮件。Can';我不能让它工作
我不能得到PHP邮件发送电子邮件 所有这些只是为了在本地主机设置中测试我的php邮件功能。XAMPP apache、mercury、mysql、windowXP 如果我使用mercury 32向您发送电子邮件,我确信我安装的mercury 32是正确的root@localhost.com它工作得很好,我看到它被发送了,在我的雷鸟收件箱里我为它设置了 php.ini是我有点困惑的地方apache,mercury32,php邮件。Can';我不能让它工作,php,php-ini,Php,Php Ini,我不能得到PHP邮件发送电子邮件 所有这些只是为了在本地主机设置中测试我的php邮件功能。XAMPP apache、mercury、mysql、windowXP 如果我使用mercury 32向您发送电子邮件,我确信我安装的mercury 32是正确的root@localhost.com它工作得很好,我看到它被发送了,在我的雷鸟收件箱里我为它设置了 php.ini是我有点困惑的地方 [mail function] ;---- I left this as is(out), since I AM
[mail function]
;---- I left this as is(out), since I AM using Mercury
; 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
;---- I created a root user in mercury
sendmail_from = root@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
;---- I left this as is(in), but I feel it should be commented out, but if I take out i get error in pho mail() code
sendmail_path = "D:\xampp\mailtodisk\mailtodisk.exe"
邮件的PHP代码() 邮件会被发送到哪里?我永远找不到它 一些图片: 测试汞。转到“文件>发送邮件”以获取此屏幕,并创建一封电子邮件进行测试 发送邮件消息“获取此屏幕并创建要测试的电子邮件”> 客户端电子邮件收件箱-上述图像/测试的结果 浏览器中的脚本输出 (第一:对不起,我的英语很差) 为了解决这个问题,我对php.ini和sendmail.ini进行了如下配置: php.ini:
[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP = 127.0.0.1
smtp_port = 25
sendmail_from = postmaster@localhost
; 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 filesC:\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 = "\"C:\xampp\sendmail\sendmail.exe\" -t"
;sendmail_path = "C:\xampp\sendmail\sendmail.exe\ -t"
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder
;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"
还有sendmail.ini
[sendmail]
; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.
;smtp_server=mail.mydomain.com
smtp_server=localhost
记住在PHP.ini上注释sendmail_路径
现在它对我起作用了:)您的邮件功能从这样的一瞥中是正确的。是否正在打印传递失败错误?也许你还有别的错误。没有其他理想的方法最有可能保存日志,请查看这些日志;应该会给你更多的洞察力。MERCURYS.LOG中没有任何有意义的内容
[sendmail]
; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.
;smtp_server=mail.mydomain.com
smtp_server=localhost