Answer the question
In order to leave comments, you need to log in
How to set up mail forwarding (Devise, Heroku)?
Hello, I started a project on Heroku. I'm trying to set up to start sending a password recovery email to the mail, but nothing comes out. Displays the error "We're sorry, but something went wrong."
production.rb file
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default_options = { from: 'моя почта' }
config.action_mailer.default_url_options = { :host => 'cinema-booking.herokuapp.com' }
config.action_mailer.smtp_settings = {
:address => 'smtp.gmail.com',
:domain => 'gmail.com',
:port => 587,
:user_name => ENV['моя почта'],
:password => ENV['полученый пароль'],
:authentication => :plain
:enable_starttls_auto => true
}
config.action_mailer.raise_delivery_errors = true
config.mailer_sender = "моя почта"
Answer the question
In order to leave comments, you need to log in
In principle, almost everything is correct.
There is only a misunderstanding of what ENV is and how to use it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question