2024-04-29 00:17:15 +02:00
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2018-06-07 17:23:12 +02:00
|
|
|
|
class ResendAttestationMailer < ApplicationMailer
|
|
|
|
|
include Rails.application.routes.url_helpers
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2018-06-07 17:23:12 +02:00
|
|
|
|
def resend_attestation(dossier)
|
2024-04-18 10:21:32 +02:00
|
|
|
|
to = dossier.user_email_for(:notification)
|
2018-06-07 17:23:12 +02:00
|
|
|
|
subject = "Nouvelle attestation pour votre dossier nº #{dossier.id}"
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2018-06-07 17:23:12 +02:00
|
|
|
|
mail(to: to, subject: subject, body: body(dossier))
|
|
|
|
|
end
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2023-10-18 07:10:26 +02:00
|
|
|
|
def self.critical_email?(action_name)
|
|
|
|
|
false
|
|
|
|
|
end
|
|
|
|
|
|
2018-06-07 17:23:12 +02:00
|
|
|
|
private
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2018-06-07 17:23:12 +02:00
|
|
|
|
def body(dossier)
|
|
|
|
|
<<~HEREDOC
|
|
|
|
|
Bonjour,
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2021-05-26 15:16:30 +02:00
|
|
|
|
L’attestation de votre dossier nº #{dossier.id} (démarche "#{dossier.procedure.libelle}") a été modifiée.
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2018-06-07 17:23:12 +02:00
|
|
|
|
Votre nouvelle attestation est disponible à l'adresse suivante :
|
2018-07-17 11:26:41 +02:00
|
|
|
|
#{attestation_dossier_url(dossier)}
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2018-06-07 17:23:12 +02:00
|
|
|
|
Cordialement,
|
2018-06-05 17:00:22 +02:00
|
|
|
|
|
2024-03-26 17:23:42 +01:00
|
|
|
|
L’équipe #{Current.application_name}
|
2018-06-07 17:23:12 +02:00
|
|
|
|
HEREDOC
|
2018-06-05 17:00:22 +02:00
|
|
|
|
end
|
|
|
|
|
end
|