2018-11-20 11:57:51 +01:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/avis_mailer
|
2017-05-02 15:37:06 +02:00
|
|
|
class AvisMailer < ApplicationMailer
|
2018-11-23 11:04:28 +01:00
|
|
|
layout 'mailers/layout'
|
|
|
|
|
2017-06-07 18:18:24 +02:00
|
|
|
def avis_invitation(avis)
|
2017-05-02 15:37:06 +02:00
|
|
|
@avis = avis
|
2019-08-06 11:02:54 +02:00
|
|
|
email = @avis.instructeur&.email || @avis.email
|
2018-05-31 15:26:02 +02:00
|
|
|
subject = "Donnez votre avis sur le dossier nº #{@avis.dossier.id} (#{@avis.dossier.procedure.libelle})"
|
2018-05-31 23:58:10 +02:00
|
|
|
|
2018-05-31 15:26:02 +02:00
|
|
|
mail(to: email, subject: subject)
|
2017-05-02 15:37:06 +02:00
|
|
|
end
|
|
|
|
end
|