I want to send email via my gmail account in PRODUCTION. It works great in local host.
In my environment.rb I have :
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "myhost.com",
:authentication => "plain",
:user_name => "name@myhost.com",
:password => "mypassword",
:enable_starttls_auto => true
}
And in my production.rb file :
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => 'gmail.com' }
But it doesn't work and I have that error :
Errno::ECONNREFUSED (Connection refused - connect(2)):
Any ideas ? My app is deployed on Heroku.
For the host
what do I have to put ?
Thanks !