jump to navigation

ActionMailer Timeouts February 22, 2009

Posted by John Dewey in Code, Monkey Patch, Rails.
trackback

The following gist contains a monkeypatch allowing configurable timeouts on ActionMailer.  Since ActionMailer is blocking, it is nice to set a reasonable timeout, rather than wrapping each of your ActionMailer calls with a Timeout (alarm).  I actually monkeypatch all of ‘net/smtp’, so just rescue ‘Timeout::Error’ where needed.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: