Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theruziev/async_sender
Simple interface to set up SMTP and send asynchronously email messages. Inspired by Sender.
https://github.com/theruziev/async_sender
asyncio hacktoberfest-accepted mail smtp
Last synced: 7 days ago
JSON representation
Simple interface to set up SMTP and send asynchronously email messages. Inspired by Sender.
- Host: GitHub
- URL: https://github.com/theruziev/async_sender
- Owner: theruziev
- License: mit
- Created: 2018-11-02T11:45:12.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T19:03:41.000Z (3 months ago)
- Last Synced: 2024-12-08T18:11:34.672Z (18 days ago)
- Topics: asyncio, hacktoberfest-accepted, mail, smtp
- Language: Python
- Homepage: http://async-sender.rtfd.io
- Size: 729 KB
- Stars: 15
- Watchers: 4
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. image:: https://img.shields.io/travis/com/theruziev/async_sender.svg?style=flat-square
:target: https://travis-ci.com/theruziev/async_sender
.. image:: https://img.shields.io/codecov/c/github/theruziev/async_sender.svg?style=flat-square
:target: https://codecov.io/gh/theruziev/async_sender
.. image:: https://img.shields.io/pypi/v/async_sender.svg?style=flat-square
:alt: PyPI
:target: https://pypi.org/project/async_sender/AsyncSender provides a simple interface to set up a SMTP connection and send email messages asynchronously.
Installation
------------Install with the following command
.. code-block:: bash
pip install async_sender
Quickstart
----------AsyncSender is really easy to use. Emails are managed through a `Mail`
instance.. code-block:: python
from async_sender import Mail
import asyncioasync 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
.. code-block:: python
from async_sender import Message
msg = Message("demo subject", from_address="[email protected]",
to="[email protected]")