Gmail on heroku with Rails 3

后端 未结 5 794
不知归路
不知归路 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:11

    I have mail being sent via Gmail on a heroku app. Here is my config if it helps. I am not using any third party plugins, just Rails 3.

    In config/initializers/setup_mail.rb

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

    In config/environments/production.rb

    After the end statement for the config block, I have added

    ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false

提交回复
热议问题