Mail function in Linux cannot send message

Source: Internet
Author: User
Tags fpm

SendMail component not installed or started

Solutions

I am a novice, the command is not familiar, so write very detailed, the veteran don't spray OH

1. Reinstall the SendMail component, I use the CentOS, install with the following command

The code is as follows Copy Code

Yum Install SendMail

2. Restart the PHP-FPM process using the following command

The code is as follows Copy Code
/ETC/INIT.D/PHP-FPM restart

3. Detect whether the SendMail is running normally

The code is as follows Copy Code
/etc/init.d/sendmail status

If the display is running running can be.

The command that might be used

The code is as follows Copy Code
/etc/init.d/sendmail start (Start SendMail)

/etc/init.d/sendmail Stop (Close sendmail)

/etc/init.d/sendmail Restart (reboot sendmail)

4. Configure php.ini, fill in the SendMail absolute path

Open edit php.ini with command

The code is as follows Copy Code

Vi/usr/local/php/etc/php.ini

Input? Sendmail_path find positioning (or manually jump to find Sendmail_path), you will find that the default is the following code

The code is as follows Copy Code

; Sendmail_path =

Press I into the editor, change this line to

The code is as follows Copy Code

Sendmail_path =/usr/sbin/sendmail-t-I.

Press ESC to exit edit, enter: Wq Save exit

5. Restart the PHP-FPM process

  code is as follows copy code


 / ETC/INIT.D/PHP-FPM restart

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.