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

January 5, 2014 3.6k 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?
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?
Have another answer? Share your knowledge.