toolware/utils/email.py
def send_html_email(
    subject,  # single line with no line-breaks
    html_content,
    to_emails,
    from_email=DEFAULT_FROM_EMAIL,
    fail_silently=True
    ):
    """ 
    Send a message to one more email address(s).
    With html content as primary.
    """
    messenger = EmailMessage(subject, html_content, from_email, to_emails)
    messenger.content_subtype = "html"  # Main content is now text/html
    try:
        messenger.send()
    except Exception as e:
        if not fail_silently:
            raise
def send_html_email(
    subject,  # single line with no line-breaks
    html_content,
    to_emails,
    from_email=DEFAULT_FROM_EMAIL,
    fail_silently=True
    ):
    """ 
    Send a message to one more email address(s).
    With html content as primary.
    """
    messenger = EmailMessage(subject, html_content, from_email, to_emails)
    messenger.content_subtype = "html"  # Main content is now text/html
    try:
        messenger.send()
    except Exception as e:
        if not fail_silently:
            raise
Send a message to one more email address(s).
    With html content as primary.