Forum: Ruby on Rails Creating a callback for ActionMailer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0af05eaf8b6b39fb3fc9d0f502bec13a?d=identicon&s=25 Ben V (Guest)
on 2007-01-24 03:47
Hello,
in my application I use Actionmailer with Google Apps over TLS to send
email from a forgotten password form. Unfortunately, sometimes it fails
to deliver the mail. In this event, I have a simple rescue block, but it
takes a while to timeout, meaning it will take 30+ seconds to catch the
error. Unfortunately, I can't have the same SMTP timeout for each part
of the application. Is there any way for me to create a callback that
errors out after 15 seconds by running two threads simultaneously
possibly?
Thanks,
Ben
This topic is locked and can not be replied to.