CentOS 6.5 send mail via PHP function sendmail

Source: Internet
Author: User

Many sites need to use the SendMail function to send activation mail, in the CentOS built-in sendmail module, direct call can, if encountered problems, can be detected and resolved by the following two steps:

1. Command line Input: echo "This is Test mail" | Mail-s ' Test mail Title ' [email protected]

In general,[email protected] This mailbox can receive a message titled "Test Mail title" with content "This istestmail" and the sender is your user name. If you do not receive the message, the SendMail function has a problem, according to the corresponding situation can be resolved.

2, generally send the message we want to specify the sender, you can edit the php.ini file, remove the Sendmail_path comment, and then change to: Sendmail_path =/usr/sbin/sendmail-f [email Protected]-t-i

where [email protected] is the sending mailbox you want to specify.

After the modification, save, and then restart the PHP-FPM, test can be.



Reference: http://www.xj123.info/4047.html

CentOS 6.5 send mail via PHP function sendmail

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.