fix send_mail
This commit is contained in:
parent
4120d0230b
commit
366522938f
|
@ -47,9 +47,12 @@ class NotifyActivateUserByEmail:
|
||||||
subject, body, from_email, [to_email])
|
subject, body, from_email, [to_email])
|
||||||
html_email = loader.render_to_string(html_email_template_name, context)
|
html_email = loader.render_to_string(html_email_template_name, context)
|
||||||
email_message.attach_alternative(html_email, 'text/html')
|
email_message.attach_alternative(html_email, 'text/html')
|
||||||
if settings.DEVELOPMENT:
|
try:
|
||||||
print(to_email)
|
if settings.DEVELOPMENT:
|
||||||
print(body)
|
print(to_email)
|
||||||
return
|
print(body)
|
||||||
|
return
|
||||||
|
|
||||||
email_message.send()
|
email_message.send()
|
||||||
|
except Exception:
|
||||||
|
return
|
||||||
|
|
Loading…
Reference in New Issue