Automatically back up a database message for a long time not received.
It should be a question of the Post Office service.
The original use of the virtual host of the Post Office,
Now use the VPS, did not install the Post office, so had to use WP mail try.
Install SendMail first.
Yum Install SendMail
Chkconfig SendMail
/ROOT/LNMP restart
/etc/init.d/sendmail start
Then test the backup mail, Roger, fix!
Test
The code is as follows |
Copy Code |
<?php $txt = "Hello";
The following email address is changed to your $mail = ' somebody@example.com ';
Send mail Mail ($mail, "My subject", $txt);
Echo ' message was sent! '; ?> |
sendmail Startup Slow problem
A lot of online methods, modify the file is to modify the file, feel more trouble, so find a minimal operation of the modification, and then succeeded.
Modify/etc/hosts, before modification
127.0.0.1 localhost.localdomain localhost
Modified into
127.0.0.1 localhost.localdomain localhost host name
The command to view the host name of this computer is: hostname
Restart SendMail after completing the modification
Service SendMail Restart
Sincerely, comment and return to a few seconds to complete the publication of success