fixed email sending for html content type

This commit is contained in:
Sam
2021-03-12 13:45:36 +00:00
parent ffb39ba62f
commit 5da01b318e
4 changed files with 9 additions and 2 deletions

View File

@@ -301,6 +301,7 @@ def purchase_email(request):
})
subject = "[latienda.coop] Solicitud de compra"
email = EmailMessage(subject, company_message, to=[company.email])
email.content_subtype = "html"
email.send()
logging.info(f"Email sent to {company}")
# send confirmation email to user
@@ -312,6 +313,7 @@ def purchase_email(request):
})
subject = 'Confirmación de petición de compra'
email = EmailMessage(subject, user_message, to=[user_email])
email.content_subtype = "html"
email.send()
logging.info(f"Purchase Contact confirmation email sent to {user_email}")
except Exception as e: