为了账号安全,请及时绑定邮箱和手机立即绑定

从Rails应用发送电子邮件时,Net :: SMTPAuthenticationError

从Rails应用发送电子邮件时,Net :: SMTPAuthenticationError

月关宝盒 2019-11-23 10:38:49
我正在从Rails应用程序发送电子邮件。它在开发环境上运行良好,但在暂存上失败。我收到以下错误:Net::SMTPAuthenticationError (534-5.7.14 <https://accounts.google.com/ContinueSignIn?plt=AKgnsbtdF0yjrQccTO2D_6)请注意,我没有暂存域名。这是我在staging.rb中的设置config.action_mailer.delivery_method = :smtpconfig.action_mailer.default_url_options = { :host => "my.ip.addr.here:80" }config.action_mailer.smtp_settings = {      :address => "smtp.gmail.com",      :port => 587,      :domain => 'my.ip.addr.here:80'      :user_name => "my_email_name@gmail.com",      :password => "my_email_password",      :authentication => 'login'}请帮忙。编辑。添加:tls => true选项后,我得到OpenSSL::SSL::SSLError (Unrecognized SSL message, plaintext connection?)然后我将端口更改为25,现在我得到了(延迟30秒):Timeout::Error (execution expired)
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 796 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信