demarches-normaliennes/app/mailers/resend_attestation_mailer.rb
2018-06-07 17:23:12 +02:00

27 lines
682 B
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class ResendAttestationMailer < ApplicationMailer
include Rails.application.routes.url_helpers
def resend_attestation(dossier)
to = dossier.user.email
subject = "Nouvelle attestation pour votre dossier nº #{dossier.id}"
mail(to: to, subject: subject, body: body(dossier))
end
private
def body(dossier)
<<~HEREDOC
Bonjour,
L'attestation de votre dossier nº #{dossier.id} (procédure "#{dossier.procedure.libelle}") a été modifiée.
Votre nouvelle attestation est disponible à l'adresse suivante :
#{dossier_attestation_url(dossier)}
Cordialement,
Léquipe demarches-simplifiees.fr
HEREDOC
end
end