Skip to content

Instantly share code, notes, and snippets.

@torgeir
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torgeir/0ae936859ee6d8f6c5d9 to your computer and use it in GitHub Desktop.
Save torgeir/0ae936859ee6d8f6c5d9 to your computer and use it in GitHub Desktop.
Telnet send email
#!/bin/bash
telnet
sleep 1
echo "open smtp.address.some.where 25"
sleep 2
echo "HELO $1"
sleep 1
echo "MAIL FROM:$2"
sleep 1
echo "RCPT TO:$3"
sleep 1
echo "DATA"
sleep 1
echo "$4"
echo ".\n"
sleep 1
echo "QUIT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment