I host my another site on my own server [ubuntu+apache+wordpress] and notice that notification mail function on my site is not work. After install sendmail, php mail function is working fine but very slow. If you also have this problem, below is how i fix it.
first make sure your /etc/hosts file first line look like this
1. edit file "wp-includes/class-phpmailer.php".
2. Looking for the line 'public $From = 'root@localhost';'.
3. Change root@localhost to something else like name@yourhost.com. I don't know why but this work for me. :)
127.0.0.1 localhost.localdomain localhost yourhostnamehostname can found on /etc/hostname. Now php mail function should work correctly. But wordpress still deny to send mail out. This have to fix with little hack[ i don't have other better way yet ].
1. edit file "wp-includes/class-phpmailer.php".
2. Looking for the line 'public $From = 'root@localhost';'.
3. Change root@localhost to something else like name@yourhost.com. I don't know why but this work for me. :)
Comments
Often used in scripts, and often abused by spam mailings:
If somebody posts email="me@example.com
Bcc:someone1@example.com,someoneelse@example.com,..."
(with linebreak behind me@example.com)
You get following headers:
From: me@example.com
Bcc:someone1@example.com,someoneelse@example.com
Php Application Development