add explanation about rescue_from in application_mailer

This commit is contained in:
clemkeirua 2019-11-07 10:13:11 +01:00
parent 7f76ab6671
commit 75923f7cb2

View file

@ -3,6 +3,7 @@ class ApplicationMailer < ActionMailer::Base
default from: "demarches-simplifiees.fr <#{CONTACT_EMAIL}>"
layout 'mailer'
# Dont retry to send a message if the server rejects the recipient address
rescue_from Net::SMTPSyntaxError do |_error|
message.perform_deliveries = false
end