Alex Rivera | Logout

What exceptions can be raised by action mailer

Asked 2012-02-08T13:40:14.697
9

I had a look at the class but could not see a list of possible exceptions that can be raised from delivering smtp email in rails 3.

Has anyone any idea?

Edit
Report

1 Answer

5

We've found this list works pretty well for standard errors that you might want to retry on:

[ EOFError,
IOError,
TimeoutError,
Errno::ECONNRESET,
Errno::ECONNABORTED,
Errno::EPIPE,
Errno::ETIMEDOUT,
Net::SMTPAuthenticationError,
Net::SMTPServerBusy,
Net::SMTPSyntaxError,
Net::SMTPUnknownError,
OpenSSL::SSL::SSLError
]

Note that I didn't include Net::SMTPFatalError because it is often a permanent failure (like a blacklisted email address).

answered 2013-03-07T18:47:55.870

Your Answer