我按照 heroku 和 sendgrid 上的所有说明进行操作,但用户在尝试注册时会收到错误消息。我运行了日志,这是错误。这里有什么问题?
2013-07-01 app[web.1]: Net::SMTPFatalError (550 Cannot receive from specified address <jay.mancho1@gmail.com>: Unauthenticated senders not allowed
我的设置;
配置/初始化程序/devise.rb
config.mailer_sender = "jay.mancho1@gmail.com"
配置/环境/production.rb
config.action_mailer.default_url_options = { :host => '***.herokuapp.com' }
ActionMailer::Base.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => "25",
:authentication => :plain,
:user_name => ENV['***@heroku.com'],
:password => ENV['***'],
:domain => ENV['heroku.com']
}