【问题标题】:Php mail() with xampp and hMailServer [duplicate]带有 xampp 和 hMailServer 的 PHP mail() [重复]
【发布时间】:2016-04-14 21:50:48
【问题描述】:

我有 Windows 2012 服务器。我已经安装了电子邮件服务器(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

知道哪里有问题吗?谢谢

编辑: 我试过了

auth_username = smtp-username
auth_password = smtp-password
sendmail_from = you@yourserver.com

使用不同的 smtp 服务器并总是收到此错误:

Warning: mail(): SMTP server response: 530 SMTP authentication is required. 

【问题讨论】:

    标签: php windows email xampp


    【解决方案1】:

    hMailServer 配置使用localhost?也许您需要使用 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 邮件,但总是同样的错误。
    猜你喜欢
    • 2018-01-07
    • 2011-08-02
    • 1970-01-01
    • 2013-07-06
    • 2015-02-01
    • 2018-11-12
    • 2015-10-21
    • 2014-04-07
    • 2014-09-04
    相关资源
    最近更新 更多