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

Posted January 5, 2014 7.3k views
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 and its just still not working. and ideas?

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.

Submit an Answer
1 answer
Try running
sudo apt-get purge postfix

sudo apt-get autoremove --purge
DEBIAN_FRONTEND=noninteractive sudo apt-get install postfix -y

Then follow
Does that fix it?