Last active
March 1, 2022 10:17
-
-
Save ptaylor/5ce8144a8ff2600c968609ecd30aa6ff to your computer and use it in GitHub Desktop.
SMTP server that writes emails to the console.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cat << __EOF__ | sudo /usr/bin/env python3 | |
PORT=25 | |
HOST='localhost' | |
import smtpd, asyncore | |
server = smtpd.DebuggingServer((HOST, PORT), None) | |
print(f"[SMTP {HOST}:{PORT}]") | |
print("[waiting for email]") | |
asyncore.loop() | |
__EOF__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment