About
Side Projects
Blog
2024-03-31

Local SMTP Server for Development and Testing (Update)

A former article 2022-07-23 on this blog covered how to temporarily run a local SMTP server for testing purposes. The technique used an earlier Python library which is no longer supported from Python 3.12.

A new equivalent uses the aiosmtpd package.

pip3 install aiosmtpd

The command line below will launch a temporary SMTP server;

python3 -m aiosmtpd -n -l 127.0.0.1:2525