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