I'd like to add the exception_notification gem to our app, however, this happens when I try to manually trigger a mail:
exception
# => #<ZeroDivisionError: divided by 0>
ExceptionNotifier::Notifier.exception_notification(request.env, exception)
# => #<ActionMailer::Base::NullMail:0x007fa81bc7c610>
ExceptionNotifier::Notifier.background_exception_notification(exception)
# => #<ActionMailer::Base::NullMail:0x007fa81bf58190>
In the above example, the console is at a breakpoint inside rescue_from Exception
in the ApplicationController after a deliberate 1/0
in some controller.
I'm using delayed_job as well, but - no surprise - ExceptionNotifier::Notifier.background_exception_notification(exception).deliver
does not spool anything.
I've already set config.consider_all_requests_local = false
in development, but still exception_notification instantiates NullMail. In other parts of the app, mailers work just fine and use sendmail
.
Any ideas what I'm doing wrong here? Thanks for your help!