adding bcc
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user