Private
Public Access
1
0

adding bcc

This commit is contained in:
Sander Roosendaal
2020-06-20 12:09:43 +02:00
parent 467e59ff3b
commit cbed58e0ca
2 changed files with 15 additions and 8 deletions

View File

@@ -80,7 +80,14 @@ def send_template_email(from_email,to_email,subject,
text_content = textify(html_content)
# html_content = newlinetobr(html_content)
if 'cc' in kwargs:
print(kwargs['bcc'])
if 'bcc' in kwargs and 'cc' in kwargs:
msg = EmailMultiAlternatives(subject, text_content, from_email, to_email,cc=kwargs['cc'],
bcc=kwargs['bcc'])
elif 'bcc' in kwargs:
msg = EmailMultiAlternatives(subject, text_content, from_email, to_email,bcc=kwargs['bcc'])
elif 'cc' in kwargs:
msg = EmailMultiAlternatives(subject, text_content, from_email, to_email,cc=kwargs['cc'])
else:
msg = EmailMultiAlternatives(subject, text_content, from_email, to_email)

View File

@@ -2446,8 +2446,8 @@ def handle_send_template_email(template,email,fromemail,rowername,
}
res = send_template_email('Rowsandall <info@rowsandall.com>',
fullemail,subject,
template,d,cc=[fromemail],**kwargs)
['info@rowsandall.com'],subject,
template,d,cc=[fromemail],bcc=fullemail,**kwargs)
@app.task
def handle_sendemail_message(email,fromemail,rowername,message,teamname,managername,