fix: html email version
This commit is contained in:
parent
d8b0b2f081
commit
8e47bfec39
|
@ -1,5 +1,4 @@
|
|||
import logging
|
||||
import re
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.mail import EmailMultiAlternatives
|
||||
|
@ -32,7 +31,7 @@ def send_vas3k_email(subscriber: Subscriber, subject: str, html: str, force: boo
|
|||
|
||||
email = EmailMultiAlternatives(
|
||||
subject=subject,
|
||||
body=re.sub(r"<[^>]+>", "", html),
|
||||
body=prepared_html,
|
||||
from_email=settings.DEFAULT_FROM_EMAIL,
|
||||
to=[subscriber.email],
|
||||
headers={
|
||||
|
@ -41,4 +40,5 @@ def send_vas3k_email(subscriber: Subscriber, subject: str, html: str, force: boo
|
|||
**kwargs
|
||||
)
|
||||
email.attach_alternative(prepared_html, "text/html")
|
||||
email.content_subtype = "html"
|
||||
return email.send(fail_silently=True)
|
||||
|
|
Loading…
Reference in New Issue