Skip to content

Simple interface to set up SMTP and send asynchronously email messages. Inspired by Sender.

License

Notifications You must be signed in to change notification settings

theruziev/async_sender

Repository files navigation

https://img.shields.io/travis/com/theruziev/async_sender.svg?style=flat-square https://img.shields.io/codecov/c/github/theruziev/async_sender.svg?style=flat-square PyPI

AsyncSender provides a simple interface to set up a SMTP connection and send email messages asynchronously.

Installation

Install with the following command

pip install async_sender

Quickstart

AsyncSender is really easy to use. Emails are managed through a Mail instance

from async_sender import Mail
import asyncio


async def run():
    mail = Mail()

    await mail.send_message("Hello", from_address="[email protected]",
                            to="[email protected]", body="Hello world!")


asyncio.run(run())

Message

To send one message, we need to create a Message instance

from async_sender import Message

msg = Message("demo subject", from_address="[email protected]",
              to="[email protected]")

About

Simple interface to set up SMTP and send asynchronously email messages. Inspired by Sender.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published