【发布时间】:2011-10-20 19:48:20
【问题描述】:
每当我尝试在我的 rails 应用程序中发送通知时,我都会收到以下错误
Net::SMTPAuthenticationError (535-5.7.1 Username and Password not accepted. Learn more at
):
app/models/friendship.rb:6:in `send_request'
app/controllers/friends_controller.rb:21:in `make_friendship'
我的 development.rb 邮件配置设置是
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
# Gmail SMTP server setup
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:enable_starttls_auto => true,
:port => 587,
:domain => '@example.com',
:authentication => :plain,
:user_name => 'user@gmail.com',
:password => 'secret'
}
【问题讨论】:
-
这在开发中对我有用,但在生产中确实失败了,知道吗?
标签: ruby-on-rails smtp