toolware/utils/email.py
def send_multi_alt_email(
    subject,  # single line with no line-breaks
    text_content,
    to_emails,
    html_content=None,
    from_email=DEFAULT_FROM_EMAIL,
    fail_silently=True
    ):
    """ 
    Send a message to one more email address(s).
    With text content as primary and html content as alternative.
    """
    messenger = EmailMultiAlternatives(subject, text_content, from_email, to_emails)
    if html_content:
        messenger.attach_alternative(html_content, "text/html")
    try:
        messenger.send()
    except Exception as e:
        if not fail_silently:
            raise
def send_multi_alt_email(
    subject,  # single line with no line-breaks
    text_content,
    to_emails,
    html_content=None,
    from_email=DEFAULT_FROM_EMAIL,
    fail_silently=True
    ):
    """ 
    Send a message to one more email address(s).
    With text content as primary and html content as alternative.
    """
    messenger = EmailMultiAlternatives(subject, text_content, from_email, to_emails)
    if html_content:
        messenger.attach_alternative(html_content, "text/html")
    try:
        messenger.send()
    except Exception as e:
        if not fail_silently:
            raise
def send_multi_alt_email ( subject , # single line with no line-breaks text_content , to_emails , html_content = None , from_email = DEFAULT_FROM_EMAIL , fail_silently = True ) : messenger = EmailMultiAlternatives ( subject , text_content , from_email , to_emails ) if html_content : messenger . attach_alternative ( html_content , "text/html" ) try : messenger . send ( ) except Exception as e : if not fail_silently : raise
Send a message to one more email address(s).
    With text content as primary and html content as alternative.
Send a message to one more email address ( s ) . With text content as primary and html content as alternative .