ActionMailer + Gmail = Timeout::Error

So in my local dev environment everything works fine. Rails 2.3.5,
Ruby 1.8.6. and require the smtp_tls plugin to send mail.

In production I have Ruby 1.8.7 So the plugin is counter productive
(will error). Without the plugin I receive the following error:

Timeout::Error (execution expired):
/usr/lib/ruby/1.8/timeout.rb:60:in open' /usr/lib/ruby/1.8/net/smtp.rb:551:indo_start’
/usr/lib/ruby/1.8/net/smtp.rb:551:in do_start' /usr/lib/ruby/1.8/net/smtp.rb:525:instart’
app/models/users_application.rb:108:in `mail_app!’

Any suggestion on where to look for a Timeout cause. It’s the exact
same setting file as with the plugin which does work:

config/initializers/smtp_gmail.rb

ActionMailer::Base.smtp_settings = {
:address => ‘smtp.gmail.com’,
:port => 587,
:authentication => :plain,
:enable_starttls_auto => true,
:user_name => “[email protected]”,
:password => “secret”
}

Cheers,
brianp

hi brain i just cofig this one for my app .
please check out
app/models/users_application.

rb:108:in `mail_app!’

and if possible plugin use action_mailer_tls that works for me thanks

On Thu, May 27, 2010 at 5:01 AM, brianp [email protected]
wrote:

/usr/lib/ruby/1.8/net/smtp.rb:525:in `start’
:authentication => :plain,
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

The controller is fine as I said it runs fine with the
action_mailer_tls plugin in my development environment. But
action_mailer_tls will cause errors on Ruby 1.8.7 which my development
server has so I can not use it. But the controller doesn’t change so
that is not the problem.