简体   繁体   中英

XAMPP OSX Lion get mail to work

Although this has been asked before, due to the fact that no satisfactory answer was provided, I thought I'd bring up that subject once again.

So: how can I get PHP's mail function to work on a Mac (I am using OS X Lion) using XAMPP?

Currently, I have the following php.ini configuration:

[mail function]
; For Win32 only.
SMTP = smtp.server.xts
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com
sendmail_from = user@server.xts

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i

So… why does it still not work and how can I fix it?

I needed this myself, and found the answer at:

http://mabblog.com/blog/2011/09/lion-smtp-postfix-relay-and-dreamhost/

I won't repeat the instructions, but the basic idea is that Lion's sendmail command is simply a wrapper for postfix. So in order to enable sendmail, you have to configure postfix to relay mail to an external mail server that you are authorized to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM