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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With