Total Pageviews

Friday, 4 January 2013

VPS主机设置sendmail实现WordPress邮件通知

Wordpress通过mail()实现邮件发送。在VPS上,需要通过sendmail模块予以实现。
以Ubuntu为例:

1.安装sendmail

apt-get install sendmail
service sendmail start

2.设置sendmail开机自动运行

apt-get install chkconfig
chkconfig sendmail on

3.修改下php.ini的配置,调用sendmail功能

vim /usr/local/php/etc/php.ini 
找到有关sendmail_path的那一行,去掉行首注释,并改成如下的样子:
sendmail_path = /usr/sbin/sendmail -t –i

4.重新启动VPS主机.