當過一次我在Rails應用程序試圖發送通知我碰到下面的錯誤網:: SMTPAuthenticationError在軌3.1.0.rc5連接時的Gmail
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 => '[email protected]',
:password => 'secret'
}
這對我來說是在開發中,但它在生產,任何想法方面都失敗了? – jpemberthy