[fix] Sendmail Can’t Send Mail!

If your Centos server/VPS can’t send mails, please read this post.

  1. Reinstall the sendmail
    yum install sendmail
  2. Restart php-fpm
    /etc/init.d/php-fpm restart
  3. 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
  4. 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.
  5. Restart php-fpm/etc/init.d/php-fpm restart