If your Centos server/VPS can’t send mails, please read this post.
- Reinstall the sendmail
yum install sendmail
- Restart php-fpm
/etc/init.d/php-fpm restart
- Test sendmail work properly or not
/etc/init.d/sendmail status
Commands you may use
/etc/init.d/sendmail start
/etc/init.d/sendmail stop
/etc/init.d/sendmail restart
- edit php.ini
vi /usr/local/php/etc/php.ini
You may find the default code:
;sendmail_path =
Press “i” to edit the code
sendmail_path = /usr/sbin/sendmail -t -i
Press “ESC” then put “:wq” quit and save. - Restart php-fpm
/etc/init.d/php-fpm restart
Done!