HostMonster主机中修改WordPress的发件人地址

经过了一番慎重的比较,最终选择了HostMonster作为未来几年使用的主机。3.95刀每月,速度很不错!

完成了搬家工作之后首先碰到了一个问题,不管是发给自己的评论通知,还是comment-reply-notification插件发给被评论人的通知邮件,发件人地址都从原来的wordpress@yourdomain.com变成了username@host###.hostmonster.com。

于是Google之!经过一番搜寻,问题终于得到解决。方法如下:

Hontmonster允许在不同的文件夹中使用不同的php.ini。首先进入cpanel中的PHP Config tool,点INSTALL PHP.INI MASTER FILE,在public_html目录产生一个php.ini.default文件。把这个文件移动到WordPress的根目录,并重命名为php.ini。

在 php.ini 文件中找到下面这行代码

sendmail_path = /usr/sbin/sendmail -t -i

将之更改为

sendmail_path = "/usr/sbin/sendmail -t -i -f'user@domain.com' "

保存。

最后,在cpanel的电子邮件账户中创建user这个账户!这是因为,Hostmonster规定发件人必须为真实存在的账户。

Hostmonster官方Knowledgebase中的解释在这里

6 Comments

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据