fix PJ
[auf_rh_dae.git] / project / dae / mail.py
CommitLineData
0f22933b
EMS
1# encoding: utf-8
2
3from django.core.mail import send_mail
4from django.core.urlresolvers import reverse
5
6from dae.workflow import grp_drh
7
8def send_drh_finalisation_mail(request, dossier):
9 subject = 'DAE: contrat pour %s' % dossier
10 dossier_url = request.build_absolute_uri(
11 reverse('embauche_consulter', kwargs={'dossier_id': dossier.id})
12 )
13 message = '\n'.join([
14 'Le contrat pour la DAE %s a été validé' % dossier,
15 '',
16 'Implantation: %s' % dossier.poste.implantation,
17 'Poste: %s' % dossier.poste,
18 '',
19 dossier_url
20 ])
21 recipients = [u.email for u in grp_drh.user_set.filter(is_active=True)]
c2a8cb1a 22 send_mail(subject, message, 'root@auf.org', recipients)