How can I send mail with PHP's mail() function

2019-02-17 23:12发布

问题:

I'm developing a website that will utilize PHP's mail() function. I'm running MAMP Pro (primarily because it has the Postfix feature that is supposed to be useful for sending emails). I feel like I've tried everything, but my program still won't send emails. It doesn't even really matter to me that I use mail(). I just want to be able to send emails from my local MAMP Pro webserver so I can test out my website. Any suggestions would be greatly appreciated!

回答1:

You need to set it up for your ISP.

http://documentation.mamp.info/en/mamp-pro/server/postfix

also

http://blog-en.mamp.info/2009/09/how-to-sending-emails-with-mamp-pro.html

Other than that, I agree with the comments. What is your ISP? What is php telling you? Also, read your logfile for postfix and tell us what it says:

http://blog-en.mamp.info/2010/03/how-to-show-postfix-log-file-of-mamp.html



标签: php email mamp