NotificationMailer: add send notification
This commit is contained in:
parent
89763ec8d4
commit
65d399b4b0
2 changed files with 19 additions and 0 deletions
|
@ -2,6 +2,15 @@ class NotificationMailer < ApplicationMailer
|
|||
default from: 'tps@apientreprise.fr',
|
||||
to: Proc.new { @user.email }
|
||||
|
||||
def send_notification dossier, email
|
||||
vars_mailer(dossier)
|
||||
|
||||
obj = email.object_for_dossier dossier
|
||||
body = email.body_for_dossier dossier
|
||||
|
||||
mail(subject: obj) { |format| format.html { body } }
|
||||
end
|
||||
|
||||
def new_answer dossier
|
||||
send_mail dossier, "Nouveau message pour votre dossier TPS N°#{dossier.id}"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue