Пример #1
0
def send_email(subject, recipients, text_body, html_body, sender=""):
    if not sender:
        msg = Message(subject, recipients=recipients)
    else:
        msg = Message(subject, recipients=recipients, sender=sender)

    msg.body = text_body
    msg.html = html_body
    mail.send(msg)
Пример #2
0
def send_email(subject, recipients, text_body, html_body, sender=""):
    if not sender:
        msg = Message(subject, recipients=recipients)
    else:
        msg = Message(subject, recipients=recipients, sender=sender)

    msg.body = text_body
    msg.html = html_body
    mail.send(msg)
Пример #3
0
def send_email(subject, recipients, text_body, html_body, sender=None):
    """Sends an email to the given recipients.

    :param subject: The subject of the email.
    :param recipients: A list of recipients.
    :param text_body: The text body of the email.
    :param html_body: The html body of the email.
    :param sender: A two-element tuple consisting of name and address.
                   If no sender is given, it will fall back to the one you
                   have configured with ``MAIL_DEFAULT_SENDER``.
    """
    msg = Message(subject, recipients=recipients, sender=sender)
    msg.body = text_body
    msg.html = html_body
    mail.send(msg)
Пример #4
0
def send_email(subject, recipients, text_body, html_body, sender=None):
    """Sends an email to the given recipients.

    :param subject: The subject of the email.
    :param recipients: A list of recipients.
    :param text_body: The text body of the email.
    :param html_body: The html body of the email.
    :param sender: A two-element tuple consisting of name and address.
                   If no sender is given, it will fall back to the one you
                   have configured with ``MAIL_DEFAULT_SENDER``.
    """
    msg = Message(subject, recipients=recipients, sender=sender)
    msg.body = text_body
    msg.html = html_body
    mail.send(msg)
Пример #5
0
def send_async_email(msg):
    mail.send(msg)
Пример #6
0
def send_email(subject, recipients, text_body, html_body, sender=None):
    msg = Message(subject, recipients=recipients, sender=sender)
    msg.body = text_body
    msg.html = html_body
    mail.send(msg)
Пример #7
0
def send_async_email(msg):
    mail.send(msg)
Пример #8
0
def send_email(subject, recipients, text_body, html_body, sender=None):
    msg = Message(subject, recipients=recipients, sender=sender)
    msg.body = text_body
    msg.html = html_body
    mail.send(msg)