Action mailer + smtp.gmail.com = timeout

100 views
Skip to first unread message

vignesh...@gmail.com

unread,
Feb 21, 2014, 3:43:29 PM2/21/14
to rubyonra...@googlegroups.com
Hi,
I'm using google's smtp server for sending mail using action mailer. This is my mailer config

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.default_url_options = { :host => 'mydomain.com }
ActionMailer::Base.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :domain               => "mydomain.com",
  :user_name            => "sup...@mydomain.com",
  :password             => "password",
  :authentication       => "plain" ,
  :enable_starttls_auto => true
}

ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true

I'm behind a firewall and I'm able to connect using `telnet smtp.gmail.com 587 `
When I try to send mail using action mailer at times the mails are sent but most of the times I end up with timeout.
#<Net::OpenTimeout: execution expired>

Please Help
- Vignesh
Reply all
Reply to author
Forward
0 new messages