The problem is how can I catch exception in delivering mail by ActionMailer. For me it sounds impossible, because in this case ActionMailer should sent mail to mailserver, a
class ApplicationMailer < ActionMailer::Base rescue_from [ExceptionThatShouldBeRescued] do |exception| #handle it here end end
Works with rails 5 onwards. And it's the best practice.