Skip to main content

async mail with simple settings and django settings support.

Project description

async_mail

https://img.shields.io/pypi/v/async_mail.svg https://img.shields.io/travis/larsclaussen/async_mail.svg Documentation Status

By django inspired async mail package.

Supports simple-settings and django settings. These settings entries are expected to be present

EMAIL_BACKEND = 'async_mail.backends.smtp.EmailBackend'
EMAIL_SENDER = 'no-reply@nelen-schuurmans.nl'
EMAIL_HOST = 'your-host-name'

EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 25
EMAIL_USE_TLS = True
EMAIL_TIMEOUT = 5

Example

To send a single mail

from async_mail import Mail
from async_mail.models import Message

mail = Mail()
message = Message(
    sender="lars.claussen@mail.com",
    recipients=["lars.claussen@mail.com"],
    subject="one mail",
    message_body="one mail to rule them all"
)
await mail.send_message(message)

TODO

  • console backend

  • pydantic settings support

  • multiple SMTP clients instead of gather for true async execution

  • Free software: MIT license

  • Documentation: https://async-mail.readthedocs.io.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1b (2020-06-03)

  • Beta release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_mail-0.1b0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

async_mail-0.1b0-py2.py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page