CentOS 6.5 sends an email via sendmail of the PHP function, centossendmail

Source: Internet
Author: User

CentOS 6.5 sends an email via sendmail of the PHP function, centossendmail

Many websites need to use the Sendmail function to send activation emails. the Sendmail module is built in centos and can be called directly. If there is a problem, perform the following two steps to detect and solve the problem:

1. Command Line input: echo "This is test mail" | mail-s 'test mail title' testname@mail.com

In general, the testname@mail.com mailbox can receive the Title of "Test mail Title", the content of "This is test mail", the sender for your user name. If you have not received the email, it indicates that the sendmail function is faulty. You can solve the problem as needed.

2. If you want to specify the sender of an ordinary sent email, edit php. INI file, remove the sendmail_path annotation, and change to: sendmail_path =/usr/sbin/sendmail-f test@mail.com-t-I

Here, the test@mail.com is the sender mailbox you want to specify.

Save the modification, restart php-fpm, and test the settings.



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


The discuz Forum sends messages through the php function sendmail

Are you using a VM? Generally, All VM instances support the sendmail function. The default value is in the background. If you select this option and cannot send emails, the space is not supported. You can use enterprise mail to send emails, for example, qq enterprise mail is free of charge. For the setting method, see www.verydz.com/help/thread-931-1-1.html. I hope dzpower can help you.
 
Discuz 20 is sent via sendmail of PHP function (this method is recommended) detailed configuration ??

If you use ESMTP mail, to configure the smtp server address such as smtp.qq.com, and port 25 on the line by default, the sender mailbox such as 888888@qq.com, the sender user name and password 888888@qq.com, xxxxxx;

If you use the mail function provided by PHP, if you need to configure the sendmail service in Linux, if it is in Windows, go to the php. ini file and configure SMTP-related parameters.
SMTP = localhost
Smtp_port = 25

If you don't understand it, HI, or QQ, I am 28605045

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.