Report this

What is the reason for this report?

PHP mail() not working, but sendmail through command prompt works?

Posted on January 5, 2014

I cant get my mail() to work. I set the php sendmail_path to “sendmail -t -i” but that still isnt working. i have installed postfix and set it up. It was working a few days ago, But I changed postfix to use my google account. but then my google account reached max mail sending. (which i didn’t know it could do) so then I tried to put it back to normal and it didn’t work. and ive reinstalled postfix like 3 times by now using this tutorial https://www.digitalocean.com/community/articles/how-to-install-and-setup-postfix-on-ubuntu-12-04

and its just still not working. and ideas?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Try running <pre>sudo apt-get purge postfix <br>sudo apt-get autoremove --purge <br>DEBIAN_FRONTEND=noninteractive sudo apt-get install postfix -y</pre> <br>Then follow <a href=“http://www.cyberciti.biz/faq/postfix-receive-mail-on-specific-network-interfaces/”>http://www.cyberciti.biz/faq/postfix-receive-mail-on-specific-network-interfaces/</a>. <br>Does that fix it?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.