Commit c52d56b9 authored by Gabriel Detraz's avatar Gabriel Detraz

Modification mail bienvenue fix

parent 0f90506a
......@@ -70,8 +70,8 @@ def notif_sent_bienvenue(users, errors, mode='all'):
if not users:
return
with mail_module.ServerConnection() as conn_smtp:
all_users = ' ;\n '.join([user.__str__() for user in users]) or u"aucun"
all_errors = ' ;\n '.join([user.__str__() for user in errors]) or u"aucun"
all_users = u' ;\n '.join([unicode(user.get('aid', [None])[0]) for user in users]) or u"aucun"
all_errors = u' ;\n '.join([unicode(user.get('aid', [None])[0]) for user in errors]) or u"aucun"
mailtxt = mail_module.generate('notifbienvenue', {'users' : all_users, 'errors' : all_errors, 'To':To, 'From': From}).as_string()
conn_smtp.sendmail(From, (To,), mailtxt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment