Home >Backend Development >PHP Tutorial >Detailed solutions to problems when sending emails with PHP mail_PHP Tutorial

Detailed solutions to problems when sending emails with PHP mail_PHP Tutorial

WBOY
WBOYOriginal
2016-07-15 13:32:01857browse

We are using

PHP mail to send emails. The complications of this situation are also that the sendmail service starts slowly

Check the sendmail log

/var/log/maillog

It can be roughly seen that there is a problem with hostname

First compare these two files

/etc/hosts

/etc/mail/local-hosts-name

Keep it consistent and confirm that the hostname is correct

The method to view and change the local hostname is hostname [newhostname:string]

Edit /etc/mail/sendmail.cf

and find the Dj$w line. The vi search command is /string

. You can see that the presentation status is commented out. Add a line here.

Dj$w.

Setup completed

/etc/init.d/sendmail restart

Restart quickly

The above is PHP Solution to slow mail sending speed.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446169.htmlTechArticleWe are using PHP mail to send emails. The complications of this situation are also that the sendmail service starts slowly. Check sendmail. Log/var/log/maillog It can be roughly seen that there is a problem with hostname first...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn