rails开发利器:rails2.3.8 如何配置发送邮件

  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 => "[email protected]",
   :password => "xxxxxxx.com"
  }



rails3中的邮箱配置

    ActionMailer::Base.smtp_settings = { 
      :address        => 'smtp.gmail.com',
      :port           => '587',
      :domain         => 'gmail.com',
      :authentication => :plain,
      :user_name      => "[email protected]",
      :password       => "xxxxxxxx",
      :enable_starttls_auto => true
    }   
    ActionMailer::Base.delivery_method = :smtp
    config.action_mailer.raise_delivery_errors = true


你可能感兴趣的:(mail,email,ruby,on,rails)