url: https://stackoverflow.com/questions/55036268/sending-email-in-python-mimemultipart created_time: 2023 Aug 18 10:00 updated_time: 28 days ago

NEW (third party):

pip install aiosmtpd
python -m aiosmtpd -n -l localhost:1025

DEPRECATED: python -m smtpd -n -c DebuggingServer localhost:1025

Deprecated since version 3.6, will be removed in version 3.12: The smtpd module is deprecated (see PEP 594 for details). The aiosmtpd package is a recommended replacement for this module. It is based on asyncio and provides a more straightforward API.