config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:authentication => :plain,
:enable_starttls_auto => true,
:user_name => "xxxxx@xxxx.com",
:password => "xxxxxxx.com"
}
rails3中的邮箱配置
ActionMailer::Base.smtp_settings = {
:address => 'smtp.gmail.com',
:port => '587',
:domain => 'gmail.com',
:authentication => :plain,
:user_name => "xxxx@xxxxx.com",
:password => "xxxxxxxx",
:enable_starttls_auto => true
}
ActionMailer::Base.delivery_method = :smtp
config.action_mailer.raise_delivery_errors = true