OS X 上的 AMPPS 邮件

AMPPS Mail on OS X

我从 10.9-10.11 版(Mavericks 到 El Capitan)一直在 OS X 上使用 运行 AMPPS(Softaculous AMPPS),并且从来没有为了 PHP mail() 函数工作。

这是我的 php.ini:

的邮件部分
    [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 = me@example.com

    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    ;sendmail_path =

    ; Force the addition of the specified parameters to be passed as extra parameters
    ; to the sendmail binary. These parameters will always replace the value of
    ; the 5th parameter to mail(), even in safe mode.
    ;mail.force_extra_parameters =

    ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
    mail.add_x_header = On

    ; The path to a log file that will log all mail() calls. Log entries include
    ; the full path of the script, line number, To address and headers.
    ;mail.log =
    ; Log mail to syslog (Event Log on NT, not valid in Windows 95).
    ;mail.log = syslog

我的问题是,电子邮件是如何发送的,或者从哪里发送的?我从未以任何方式配置 AMPPS 来发送电子邮件。它们似乎很管用。

我问的原因是,我正在尝试在本地网络服务器上设置 AMPPS,但即使在使用我的 gmail 帐户配置 smpt 电子邮件设置后也无法发送电子邮件。

我发现 OS X 预装了 postfix,这就是我不需要为 PHP.

设置 SMTP 设置的原因

但是,由于我的 PC 问题,为了避免更多麻烦,我只是在 windows 本地服务器上安装了 hMailServer,PHP mail() 函数可以完美地发送电子邮件。