开发者

XAMPP OSX Lion get mail to work

开发者 https://www.devze.com 2023-03-29 18:15 出处:网络
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.

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

精彩评论

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