I am trying to send mail using PHP
but it doesn't seem to be working.
I am running Mac OS X Snow Leopard
.
I've tried a simple PHP script开发者_StackOverflow中文版 using mail()
, which doesn't write anything to /var/log/mail.log
Does anyone have any ideas?
Natively, you are unable to send mail from your computer. You need to configure this in the php.ini file using SMTP (perhaps using Gmail). Consider reading this article, it will clarify things:
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1045471.html
The article is a bit extensive, but it should give you a thorough understanding.
Hope this helps
Once this happened to me; What I did was I made it send a mail message via SMTP(gmail account) and that fixed it. I dont know what caused it, perhaps a lack of an SMTP server. (on my ubuntu computer, but same thing i guess)
Does this help? PHP, mail() and OSX Leopard
You can try:
sudo postfix start
in Terminal
精彩评论