automatic expiry of non-recurring users
This commit is contained in:
@@ -59,8 +59,12 @@ def send_template_email(from_email,to_email,subject,
|
||||
|
||||
html_content = htmly.render(context)
|
||||
text_content = textify(html_content)
|
||||
|
||||
if '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)
|
||||
|
||||
msg = EmailMultiAlternatives(subject, text_content, from_email, to_email)
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
|
||||
if 'attach_file' in kwargs:
|
||||
@@ -82,6 +86,8 @@ def send_template_email(from_email,to_email,subject,
|
||||
else:
|
||||
emailbounced = False
|
||||
|
||||
|
||||
|
||||
if not emailbounced:
|
||||
res = msg.send()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user