ra2.py : bug disconnect destinataire explicite

This commit is contained in:
Gabriel Detraz 2015-02-23 19:25:14 +01:00
parent 429da4655c
commit 9f23c4a5d9
4 changed files with 6 additions and 4 deletions

View file

@ -69,9 +69,9 @@ def ra_blacklist(Mac_ra):
# On envoie une notification à disconnect et à la personne :
def send_mail(machine):
adh = machine.proprio()
From = 'disconnect@crans.org'
From = 'disconnect@lists.crans.org'
To = adh.get_mail()
Cc = 'disconnect@crans.org'
Cc = 'disconnect@lists.crans.org'
name = adh.ldap_name
mach = unicode(machine['host'][0])
if isinstance(adh, lc_ldap.objets.adherent):
@ -80,6 +80,7 @@ def send_mail(machine):
tname = unicode(adh['nom'][0])
mailtxt = mail.generate('deconnex_ra', {
'To': To,
'Cc': Cc,
'From': From,
'tname': tname,
'mach': mach,