X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/3e0a2c257d49fb162da9c70d2f70194036235166..8c427cd00d1605e275df038865ffa85623171c13:/skins/control/send_email.py?ds=sidebyside diff --git a/skins/control/send_email.py b/skins/control/send_email.py index 35b3d82..93c573f 100644 --- a/skins/control/send_email.py +++ b/skins/control/send_email.py @@ -38,8 +38,6 @@ def encodeAdr(member) : sender = mtool.getAuthenticatedMember() sender = encodeAdr(sender) -if other_adr : - recipients['to'].extend(other_adr) recipientsFormated = {'to':'', 'cc':'', 'bcc':''} for field, b in recipients.items() : @@ -47,6 +45,13 @@ for field, b in recipients.items() : formated = filter(None, formated) formated = ', '.join(formated) recipientsFormated[field] = formated + +if other_adr : + recipients['to'].extend(other_adr) + formated = ', '.join(other_adr) + to = ', '.join([recipientsFormated['to'], formated]) + to = to.strip(', ') + recipientsFormated['to'] = to recipientsHeader = [] for field in ['to', 'cc', 'bcc'] : @@ -68,7 +73,6 @@ MailHost.send( message.encode('utf-8') ) if wfid is not None : wtool = portal.portal_workflow email_sent = reduce(lambda a, b : a+b, recipients.values()) - email_sent.extend(other_adr) wtool.doActionFor(context, 'send_email', wf_id=wfid, email_sent=email_sent, comment=text_body)