Heroku not sending email with Gmail SMTP

后端 未结 3 1412
既然无缘
既然无缘 2020-12-04 02:45

The app works everything, I\'m trying to use Confirmable with Devise, on my Rails app it says that the email was sent, but I never receive it. I\'m configuring it with Gmail

3条回答
  •  情歌与酒
    2020-12-04 03:19

    First heroku does not allow to send mails for free, you need to set up your credit card details to send mails, Secondly

    Check you have rightly configured

    open development.rb and update with the following

    config.action_mailer.delivery_method = :smtp
      config.action_mailer.default_url_options = { host:'localhost', port: '3000' }
      config.action_mailer.perform_deliveries = true
      config.action_mailer.raise_delivery_errors = true
      config.action_mailer.default :charset => "utf-8"
      config.action_mailer.smtp_settings = {
          :address => "smtp.gmail.com",
          :port => 25,
          :domain => 'localhost:3000',
          :user_name => "email id",
          :password => "password",
          :authentication => :plain,
          :enable_starttls_auto => true
      }
    

提交回复
热议问题