开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜