forked from DGNum/gestioCOF
Fix wrong email generation in _traitement_post
The list `proposed_mails` is a list of elements of the kind `(User, (mail_object, mail_body))` but it was handled as if it were `(User, mail_body)` in the function `_traitement_post`.
This commit is contained in:
parent
98abe71681
commit
c513794474
1 changed files with 2 additions and 3 deletions
|
@ -255,9 +255,8 @@ def _traitement_post(request, demande):
|
|||
bccaddress = settings.MAIL_DATA['petits_cours']['BCC']
|
||||
replyto = settings.MAIL_DATA['petits_cours']['REPLYTO']
|
||||
mails_to_send = []
|
||||
for (user, msg) in proposed_mails:
|
||||
msg = mail.EmailMessage("Petits cours ENS par le COF", msg,
|
||||
frommail, [user.email],
|
||||
for (user, (mail_object, body)) in proposed_mails:
|
||||
msg = mail.EmailMessage(mail_object, body, frommail, [user.email],
|
||||
[bccaddress], headers={'Reply-To': replyto})
|
||||
mails_to_send.append(msg)
|
||||
mails_to_send.append(mail.EmailMessage("Cours particuliers ENS", mainmail,
|
||||
|
|
Loading…
Reference in a new issue