How to use the mailsuite.smtp.send_email function in mailsuite

To help you get started, we’ve selected a few mailsuite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github domainaware / parsedmarc / parsedmarc / __init__.py View on Github external
if not attachment_filename.lower().endswith(".zip"):
            attachment_filename += ".zip"
        filename = attachment_filename
    else:
        filename = "DMARC-{0}.zip".format(date_string)

    assert isinstance(mail_to, list)

    if subject is None:
        subject = "DMARC results for {0}".format(date_string)
    if message is None:
        message = "DMARC results for {0}".format(date_string)
    zip_bytes = get_report_zip(results)
    attachments = [(filename, zip_bytes)]

    send_email(host, mail_from, mail_to, message_cc=mail_cc,
               message_bcc=mail_bcc, port=port,
               require_encryption=require_encryption, verify=verify,
               username=username, password=password, subject=subject,
               attachments=attachments, plain_message=message)

mailsuite

A Python package for retrieving, parsing, and sending emails

Apache-2.0
Latest version published 29 days ago

Package Health Score

63 / 100
Full package analysis

Similar packages