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
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
}
I was running into a similar issue. The problem I was having was that I wasn't telling Heroku to copy my configuration variables over to Heroku as environment variables. I used the figaro gem and the smtp email worked after entering this command:
figaro heroku:set -e production
I would recommend that you make sure that you are using the correct gmail username and password.
For more information checkout this tutorial. I can confirm that it works http://usingname.space/2015/07/25/gmail-smtp-ruby-on-rails-actionmailer-and-you/
You have to check two important things when you want to send emails via Gmail smtp:
Your apps configuration:
smtp.gmail.com
587
or 465
(587 for tls, 465 for ssl)tls
or ssl
YOUR_USERNAME@gmail.com
YOUR_PASSWORD
The given Gmail account settings: