Envoi mail bulletins: bcc multiple addr.

This commit is contained in:
Emmanuel Viennet 2023-01-19 11:51:57 -03:00 committed by iziram
parent 294ce1d708
commit 53514ef919
3 changed files with 4 additions and 4 deletions

View File

@ -1084,7 +1084,7 @@ def mail_bulletin(formsemestre_id, infos, pdfdata, filename, recipient_addr):
recipients = [recipient_addr] recipients = [recipient_addr]
sender = sco_preferences.get_preference("email_from_addr", formsemestre_id) sender = sco_preferences.get_preference("email_from_addr", formsemestre_id)
if copy_addr: if copy_addr:
bcc = copy_addr.strip() bcc = copy_addr.strip().split(",")
else: else:
bcc = "" bcc = ""
@ -1094,7 +1094,7 @@ def mail_bulletin(formsemestre_id, infos, pdfdata, filename, recipient_addr):
subject, subject,
sender, sender,
recipients, recipients,
bcc=[bcc], bcc=bcc,
text_body=hea, text_body=hea,
attachments=[ attachments=[
{"filename": filename, "mimetype": scu.PDF_MIMETYPE, "data": pdfdata} {"filename": filename, "mimetype": scu.PDF_MIMETYPE, "data": pdfdata}

View File

@ -1565,7 +1565,7 @@ class BasePreferences(object):
"initvalue": "", "initvalue": "",
"title": "e-mail copie bulletins", "title": "e-mail copie bulletins",
"size": 40, "size": 40,
"explanation": "adresse recevant une copie des bulletins envoyés aux étudiants", "explanation": "adresse(s) recevant une copie des bulletins envoyés aux étudiants (si plusieurs, les séparer par des virgules)",
"category": "bul_mail", "category": "bul_mail",
}, },
), ),

View File

@ -1,7 +1,7 @@
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.4.28" SCOVERSION = "9.4.29"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"