I always forget it and google it, so make a note.
>>> import asyncore, smtpd
>>> smtpd.DebuggingServer(('localhost', 1025), None)
<smtpd.DebuggingServer listening localhost:1025 at 0x107a55d40>
>>> asyncore.loop()
Just launch the interactive shell and write as above. After that, when a message comes, it will be output on the spot.
Recommended Posts