宇宙主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

欧基零壹微头条IP归属甄别会员请立即修改密码
查看: 3434|回复: 8

hostdare也封25端口吗?电子邮件未能发送

[复制链接]
发表于 2017-3-16 20:37:30 | 显示全部楼层 |阅读模式
电子邮件未能发送。
可能原因:您的主机禁用了mail()函数


之前用 ramnode 直接在WP的后台安装一个WP-Mail-SMTP插件即可。
 楼主| 发表于 2017-3-16 20:54:12 | 显示全部楼层
有没童鞋用这家主机的 或怎么解决~
 楼主| 发表于 2017-3-16 21:11:56 | 显示全部楼层
We do not block any port . I think this is firewall issue or something blocking inside your vps .

Possible reason: your host disables the mail () function.

This means php mail function issue ,not port 25 blocked .

If port was blocked,you will get bounced messages from mails .

This is your software mis configuration ,as this is unmanaged vps,you will need to get the issue checked by system admin .
发表于 2017-3-16 21:16:29 | 显示全部楼层
  1. function MBT_mail_smtp( $phpmailer ) {
  2. $phpmailer->IsSMTP();
  3. $phpmailer->SMTPAuth = true;
  4. $phpmailer->Port = 端口;
  5. $phpmailer->SMTPSecure ="加密方式";
  6. $phpmailer->Host = "smtp服务器地址";
  7. $phpmailer->Username = "帐号";
  8. $phpmailer->Password ="密码";
  9. }
  10. add_action('phpmailer_init', 'MBT_mail_smtp');
  11. //下面这个很重要,得将发件地址改成和上面smtp邮箱一致才行。
  12. function MBT_wp_mail_from( $original_email_address ) {
  13. return '邮箱';
  14. }
  15. add_filter( 'wp_mail_from', 'MBT_wp_mail_from' );
复制代码


直接加到functions.php里面 实现smtp
发表于 2017-3-16 21:40:21 来自手机 | 显示全部楼层
vps的话你自己可以打开啊
 楼主| 发表于 2017-3-16 21:56:06 | 显示全部楼层
本帖最后由 阳光淡蓝 于 2017-3-16 22:04 编辑
fyubo 发表于 2017-3-16 21:40
vps的话你自己可以打开啊


服务商说是防火墙或设置问题。。。
请问该怎么处理呢? 照上面的添加到functions.php不起作用。
 楼主| 发表于 2017-3-16 22:37:27 | 显示全部楼层
关闭插件就行了。。默认的sendmail可以发,只是有点慢。
发表于 2017-3-17 03:19:05 来自手机 | 显示全部楼层
自己测试是不是vps商封了,telnet smtp.163.com 25没有安装telnet自行安装一下就好了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|FastFib VPS论坛

GMT+8, 2024-9-20 19:37 , Processed in 0.065509 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表