带有xampp和hMailServer的Php mail()
我有Windows2012服务器。我已安装电子邮件服务器(hMailServer),该服务器已配置并正确发送/接收电子邮件 但当我想从php发送邮件时,(我必须使用mail()函数),什么都不会发生 在php.ini中,我设置:带有xampp和hMailServer的Php mail(),php,windows,email,xampp,Php,Windows,Email,Xampp,我有Windows2012服务器。我已安装电子邮件服务器(hMailServer),该服务器已配置并正确发送/接收电子邮件 但当我想从php发送邮件时,(我必须使用mail()函数),什么都不会发生 在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 知道
[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
知道哪里有问题吗?多谢各位
编辑:
我试过了
使用不同的smtp服务器并始终收到此错误:
Warning: mail(): SMTP server response: 530 SMTP authentication is required.
hMailServer配置是否使用本地主机?也许您需要使用SMTP身份验证 尝试像这样使用远程凭据
[mail function]
; For Win32 only.
SMTP = mail.yourserver.com
smtp_port = 25
auth_username = smtp-username
auth_password = smtp-password
sendmail_from = you@yourserver.com
我照你说的做了,但得到了错误-警告:mail():SMTP服务器响应:530 SMTP身份验证是必需的。我尝试了更多的smtp邮件,但总是出现相同的错误。
[mail function]
; For Win32 only.
SMTP = mail.yourserver.com
smtp_port = 25
auth_username = smtp-username
auth_password = smtp-password
sendmail_from = you@yourserver.com