/aiosmtplib

asyncio smtplib implementation

Primary LanguagePythonMIT LicenseMIT

aiosmtplib

"aiosmtplib CircleCI build status" codecov "aiosmtplib on the Python Package Index" pypi-python-versions pypi-status pypi-license "Code style: black"


aiosmtplib is an asynchronous SMTP client for use with asyncio.

For documentation, see Read The Docs.

Quickstart

import asyncio
from email.message import EmailMessage

import aiosmtplib

message = EmailMessage()
message["From"] = "root@localhost"
message["To"] = "somebody@example.com"
message["Subject"] = "Hello World!"
message.set_content("Sent via aiosmtplib")

loop = asyncio.get_event_loop()
loop.run_until_complete(aiosmtplib.send(message, hostname="127.0.0.1", port=25))

Requirements

Python 3.5.2+, compiled with SSL support, is required.

Bug reporting

Bug reports (and feature requests) are welcome via Github issues.