【发布时间】:2014-06-11 13:59:33
【问题描述】:
我有一个使用 Gmail 发送 Actionmailer 电子邮件的 Rails 应用程序。几个月来它一直运行良好,但现在我更改了我的 Gmail 密码,它已经停止工作,并且出现错误:
Net::SMTPAuthenticationError (535-5.7.8 Username and Password not accepted.
我在 production.rb 和 development.rb 文件中调整了新密码:
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
#domain: 'thetens.us',
user_name: 'myaddress@gmail.com',
password: 'mypassword',
authentication: 'plain',
enable_starttls_auto: true }
我确定密码正确。有没有办法强制它在没有更新的地方更新?
【问题讨论】:
-
上述配置文件中修改密码后是否重启了服务器
-
@ShamsulHaque 是的,无论是在本地还是在 heroku 上
标签: ruby-on-rails gmail actionmailer