[WEB-5917] fix: generate clean plain text from HTML email template #8535
This commit is contained in:
parent
e9b011896d
commit
f0dcf66167
12 changed files with 65 additions and 23 deletions
|
|
@ -8,7 +8,6 @@ import logging
|
|||
# Django imports
|
||||
from django.core.mail import EmailMultiAlternatives, get_connection
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.html import strip_tags
|
||||
|
||||
# Third party imports
|
||||
from celery import shared_task
|
||||
|
|
@ -16,6 +15,7 @@ from celery import shared_task
|
|||
# Module imports
|
||||
from plane.db.models import User
|
||||
from plane.license.utils.instance_value import get_email_configuration
|
||||
from plane.utils.email import generate_plain_text_from_html
|
||||
from plane.utils.exception_logger import log_exception
|
||||
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ def user_activation_email(current_site, user_id):
|
|||
# Send email to user
|
||||
html_content = render_to_string("emails/user/user_activation.html", context)
|
||||
|
||||
text_content = strip_tags(html_content)
|
||||
text_content = generate_plain_text_from_html(html_content)
|
||||
# Configure email connection from the database
|
||||
(
|
||||
EMAIL_HOST,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue