views:

372

answers:

1

The default in Ruby on Rails is to have this set to false (in production and development).

config.action_mailer.raise_delivery_errors = false

Seems strange. I'm definitely turning it on in development which has been helpful. But why does no one seem to have this turned on in production? Shouldn't we want to get notified if an email doesn't go through? This seems rather important.

The rails comment in production.rb states

bad email addresses will be ignored

But I have some validation to check incorrect email addresses. It seems like I'd still want to know (via exception notifier or otherwise) how often users aren't getting emails.

A: 

the real question is do you want a failed email to throw an error to your end user? Perhaps the mail server is down or a handful of other reasons prevent the email from being sent. Do you want this to throw a 50x error to your user?

Personally, I deliver all email asynchronously so I can monitor this type of stuff (plus it helps greatly in response times)

cpjolicoeur
Hi there, I think yes, because if the user is seeing it, it means I'll see it (and know about) via exception mailer. Otherwise I'd probably never know something was going wrong. I'm using postfix, which I believe does it asynchronously, so this means it should rarely (if ever) be unavailable right? Or if an error occurs it would show up in postfix? Thanks for your help.
Brian Armstrong