新手问题 Spree 项目中邮件不能发送的问题

paul1113 · January 06, 2015 · Last by Martin91 replied at January 07, 2015 · 2200 hits

测试邮件错误:530 5.7.0 Must issue a STARTTLS command first. e108sm52535614qge.15 - gsmtp 配置信息写在 config/environments/development.rb config.action_mailer.delivery_method = :sendmail config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: 'smtp.gmail.com', port: 587, domain: 'gmail.com', user_name: 'xxx', password: 'xxx', authentication: 'plain', enable_starttls_auto: true } config.action_mailer.raise_delivery_errors = true config.action_mailer.perform_deliveries = true config.action_mailer.default_options = {from: '[email protected]'} 这个错误今天 google 很久还是没解决所以来这里请教大家,打扰了!

gmail 不是已经被墙死了 你还能访问么?

#1 楼 @yangman_wenzhu 我买的国外的空间,系统装载国外服务器上的。

#2 楼 @paul1113 哦 这样哦 有没有看过自己 Gmail 邮箱的设置里面的这些配置呢?

是不是连接类型跟 SMTP 认证类型没设置对?我记得 Spree 的配置好像是数据库优先的,所以要先保证数据库里的配置数据正确。而且你的配置文件为什么会有重复的两行配置:

config.action_mailer.delivery_method = :sendmail
config.action_mailer.delivery_method = :smtp

另外,开头不是有错误信息吗?

530 5.7.0 Must issue a STARTTLS command first. e108sm52535614qge.15 - gsmtp

这个错误信息的解释是:

The problem is that Gmail requires TLS authentication

应该是安全连接的问题,尝试在页面上将“安全连接类型”设置为 StarTTLS 试试?或者是将 SMTP 认证模式设置为 TLS?

You need to Sign in before reply, if you don't have an account, please Sign up first.