disable retry sending a mail with an invalid email adress

This commit is contained in:
clemkeirua 2019-10-31 16:31:40 +01:00
parent 5a310b6c2b
commit 7f76ab6671
2 changed files with 24 additions and 0 deletions

View file

@ -3,6 +3,10 @@ class ApplicationMailer < ActionMailer::Base
default from: "demarches-simplifiees.fr <#{CONTACT_EMAIL}>"
layout 'mailer'
rescue_from Net::SMTPSyntaxError do |_error|
message.perform_deliveries = false
end
# Attach the procedure logo to the email (if any).
# Returns the attachment url.
def attach_logo(procedure)