add rescue_from to UserDeviseMailer
This commit is contained in:
parent
ff3f4774e8
commit
f2c69400aa
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,11 @@ class DeviseUserMailer < Devise::Mailer
|
|||
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`
|
||||
layout 'mailers/layout'
|
||||
|
||||
# Don’t 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
|
||||
|
|
Loading…
Reference in a new issue