raksmart活动促销

分享

写回答

发帖

[提问] HostMonster: 您的主机禁用了 mail() 函数...

HostMonster HostMonster 11116 人阅读 | 8 人回复

发表于 2010-12-30 11:47:53 | 显示全部楼层 |阅读模式

2010年12月29号一天都故障了,今天一打开,发现别人给我留言都没有发送邮件通知,还以为是自身原因,后来发现wordpress的找回密码都发送不了邮件了,你们的是否正常,还是我自己的问题原因,怎么办啊??
11111.jpg

回答|共 8 个

nokla

发表于 2010-12-30 11:48:38 | 显示全部楼层

对了,补充一下,联系了HostMonster的客服,说是正常的,没有禁用,我了个去!

开心私塾

发表于 2010-12-30 11:52:34 | 显示全部楼层

你自己测试一下看看,用gmail邮箱测试,主机商一般不会禁用mail()函数的。

nokla

发表于 2010-12-30 15:17:49 | 显示全部楼层

都测试了,使用过 Configure SMTP,以前都能发邮件通知,现在就不能了。
今天提问到Hostmonster,回复是:
Hello,


Quote:
>>"My host disabled the e-mail function mail ()?"

No we did not disable the mail function, however Most wordpress installations need to use the "Mail-From" plugin to allow emails to be sent out.

If you need access to your wordpresss (you can't remember the password, then please reply back with the url, your username and the password you would like and we can help you get in.  However, you will need to install that wordpress plugin if you want to send emails.

The Reason it's required is due to a special spam filter we have.  If you attempt to send emails from any address that is not created in your Cpanel account, then our system will stop the message from sending.  Therefore, since wordpress  usually sets up no-reply@domain.com or wordpress@domain.com to send from, it's typically denied by our server. Use the Mail-From program to set the From address to one that's listed in your Cpanel to get it to work right.

Thank you,
Matt
Level II Tech Support Engineer
Hostmonster.com
866.573.4678

Most questions can be answered by articles in our forum, knowledgebase, and video tutorials:
大家请帮我看看

开心私塾

发表于 2010-12-30 15:23:19 | 显示全部楼层

你测试更换其他的WordPress模板试试,客服说也有可能是模板的原因,说有的模板需要Mail-From插件的支持。

boro

发表于 2010-12-30 16:46:35 | 显示全部楼层

你上传个php探针,然后通过探针发个php mail试一下

jellday

发表于 2011-1-3 13:14:28 | 显示全部楼层

就是说,你必须要有那个发邮件的账户,否则不能发。假如你要发的邮件地址为no-reply@....,但是邮件账户里没有,就不能发

whaoran

发表于 2012-1-4 10:18:42 | 显示全部楼层

大家都知道,Wordpress的评论回复功能就是使用主机的Mail函数实现的。但很多主机都把Mail函数禁用了。想知道自己使用的主机,支持不支持Mail函数,方法好简单:在登陆后台的时候,使用忘记密码。如果提示“邮件无发发送,可能Mail函数被禁用”如此云云,则说明你使用的主机Mail函数被禁了。

然而Wordpress的评论回复功能,可以增加用户的粘度。也就是用户在你博客评论之后,可能会忘了曾经评论过,这个评论回复的邮件会提醒他们,使他们再一次回访到你的博客,增加用户粘度。

既然Wordpress的评论回复功能这般重要,被禁用Mail函数的博友要么换主机,否则就必须想办法了。

如果你使用的是windows主机,那么你可以直接漂过。介绍的是Linux主机禁用Mail函数的解决办法:

1、下载wp-mail-smtp插件,并启用,进行相关的配置。
http://wanghaoran.net/wordpress/1901.html
2、下载Comment Reply Notification 插件,启用并配置。
WordPress使用Linux主机禁用Mail函数的解决办法
3、打开插件的wp_mail_smtp.php文件(位于wp-content\plugins\wp-mail-smtp中)找到以下代码,并删掉:

if ( $orig != $default_from ) {

return $orig;

}

这个方法阿柯还没有测试成功,原因是在设置wp-mail-smtp插件时,测试在smtp时不对,造成测试邮件无法链接smtp主机,也就没有后面的步骤了。希望有相同问题的博友能指点一下。
回复 支持 反对

使用道具 举报

大漠孤狼

发表于 2012-1-6 16:17:45 | 显示全部楼层

一般主机商都不会禁用这个函数
用探针或者phpinfo看下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

HostMonster讨论

HostMonster
优惠码:优惠链接
介绍:HostMonster美国主机商成立于1996年,总部位于犹他州普罗沃,提供主机托管服务,在业内有比较有实力,而且口碑也不错。HostMonster美国主机性价比较高,而且基本不会额外收取费用,其无限型方案支持无限磁盘空间,无限带宽和电子邮件帐户,提供免费域名1个。
查看更多

nokla

发表主题