Gmail on heroku with Rails 3

后端 未结 5 798
不知归路
不知归路 2021-01-11 16:08

I am trying to send emails from Heroku up and running. At the moment I can send emails from Heroku via the \"tutorial\" at http://blog.heroku.com/archives/2009/11/9/tech_sen

5条回答
  •  失恋的感觉
    2021-01-11 16:14

    Please add the following code in config/environments/development.rb

    config.action_mailer.raise_delivery_errors = false
    config.action_mailer.delivery_method = :smtp
    config.action_mailer.perform_deliveries = true
    

    and also make sure you have added the following in config/initializers/smtp_gmail.rb

    ActionMailer::Base.smtp_settings = {
      :address              => "smtp.gmail.com",
      :port                 => 587,
      :user_name            => "abc@xyz.com",
      :password             => "password",
      :authentication       => "plain",
      :enable_starttls_auto => true
    }
    

提交回复
热议问题