新手问题 Action Mailer 无法发送邮件???!

JiangYongKang · July 15, 2019 · Last by JiangYongKang replied at July 15, 2019 · 1889 hits

当收件人邮箱是 Gmail 腾讯企业邮箱 QQ 邮箱等都可以正常发送和接收,但是当收件人邮箱是 163 邮箱时,就会接收不到邮件,这是为何呢?163 有毒啊??!! 配置如下:

# config/environments/development.rb
config.action_mailer.perform_caching       = false
config.action_mailer.perform_deliveries    = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method       = :smtp
config.action_mailer.smtp_settings         = {
    address:              'smtp.exmail.qq.com',
    port:                 465,
    domail:               'qq.com',
    ssl:                  true,
    user_name:            'username',
    password:             'password',
    authentication:       'plain',
    enable_starttls_auto: true,
}

@rennyallen 之前又看到你在发送邮箱这块踩过坑,可以帮忙分析一下吗?谢谢。

同样的邮件内容 用 QQ 企业邮箱的网页版发一下试试 如果 163 还收不到,试试别的内容是否 OK(可能触发了反垃圾规则),如果还收不到,为 163 换个邮件服务商吧

阿里 465 端口被禁用了

@jasl 果然是这样啊,网页版也发布过去。

@jicheng1014 你指的是 ECS 的端口?可是我现在本地发送邮件到 163 邮箱都不行的哎。

我还是比较推荐别在服务器直接起 smtp, 用类似https://sendcloud.sohu.com 或者 mailgun 啥的会好一点

腾讯企业邮箱项目初期挺好用,国内国外的送达率较高,正规的话,国内 SendCloud,国外 MailChimp MailGun,还有个 坑是,国外的服务发国内的送达率非常低,反过来也是,包括国内用 SendCloud 保险也要买多个 IP 来发送。

总之邮件是巨坑,而且不可抗力因素过多

Reply to jasl

decentralized email XD

@jicheng1014 @jasl 受教了,还不知道有邮件推送的云服务。感谢两位。

JiangYongKang closed this topic. 15 Jul 18:18
You need to Sign in before reply, if you don't have an account, please Sign up first.