Let us handle the boring stuff!
This extension provides an Async SMTP client object configured via pyApp settings.
Install with pip:
pip install pyApp-aiosmtplib
Add the SMTP block into your runtime settings file:
SMTPLIB = { "default": { "host": "localhost", } }
Note
In addition to the host any argument that can be provided to aiosmtplib.SMTP can be provided.
The following example creates an SMTP client instance:
from pyapp_ext.aiosmtplib import get_client smtp = get_client()
pyapp_ext.aiosmtplib.get_client() -> SMTP
Get named SMTP instance.