企鹅邮箱的 smtp 服务器该不会 block 所有海外的邮件转发请求吧???

2016-11-30 23:27:06 +08:00
 jazdelu

背景: 最近一直有客户向我投诉说收不到订单邮件或者网站 contact 邮件了。于是我开始测试 环境: 测试机器(国内) 生产环境(新加坡) 框架: Django 测试代码(摘自 django doc ): from django.core.mail import EmailMultiAlternatives subject, from_email, to = 'hello', 'noreply@example.com', 'to@example.com' text_content = 'This is an important message.' html_content = '

This is an important message.

' msg = EmailMultiAlternatives(subject, text_content, from_email, [to]) msg.attach_alternative(html_content, "text/html") msg.send()

settings.py: EMAIL_HOST = 'hwsmtp.exmail.qq.com' EMAIL_HOST_USER = 'noreply@example.com' EMAIL_HOST_PASSWORD = 略 DEFAULT_FROM_EMAIL = 'noreply@example.com' EMAIL_USE_SSL = False

这样一段代码在本地机器上运行时 ok 的,'to@example.com'这个邮箱里也会收到邮件。 但是等我在生产环境的 django shell 里面做测试的时候。。。 直接就出现 [Errno 111] Connection refused (懒得截图了。。)

所以这是不是意味着如果服务器架在海外的话就不能找企鹅邮箱做邮件代理了。 那么问题来了,有靠谱的推荐吗

1952 次点击
所在节点    问与答
1 条回复
MrGba2z
2016-12-01 03:27:15 +08:00
mailgun 不过 mailgun 对 QQ 支持有问题
或者自己搭建(不推荐。。除非业务量不大)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/324458

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX