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)
|
|
|
|
|
to = dossier.user.email
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2018-09-05 14:48:42 +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
|
|
|
|
|
2020-07-23 15:09:47 +02:00
|
|
|
|
L’équipe #{APPLICATION_NAME}
|
2018-06-07 17:23:12 +02:00
|
|
|
|
HEREDOC
|
2018-06-05 17:00:22 +02:00
|
|
|
|
end
|
|
|
|
|
end
|