add rescue_from to UserDeviseMailer

This commit is contained in:
clemkeirua 2019-11-20 17:57:34 +01:00 committed by Pierre de La Morinerie
parent ff3f4774e8
commit f2c69400aa

View file

@ -4,6 +4,11 @@ class DeviseUserMailer < Devise::Mailer
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`
layout 'mailers/layout'
# Dont retry to send a message if the server rejects the recipient address
rescue_from Net::SMTPSyntaxError do |_error|
message.perform_deliveries = false
end
def template_paths
['devise_mailer']
end