Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@westphahl
Last active December 11, 2015 21:29
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 westphahl/4663221 to your computer and use it in GitHub Desktop.
Save westphahl/4663221 to your computer and use it in GitHub Desktop.
Testing SMTP with telnet
$ echo 'me@example.com' | base64
bWVAZXhhbXBsZS5jb20=
$ echo 'secret' | base64
c2VjcmV0
$ telnet mail.example.com 25

EHLO me.example.com
250-mail.example.com
250-AUTH LOGIN
250-8BITMIME
250-SIZE

AUTH LOGIN
334 VXNlcm5hbWU6;

bWVAZXhhbXBsZS5jb20=
334 UGFzc3dvcmQ6;

c2VjcmV0
235 Authentication successful

MAIL FROM:<me@example.com>
250 OK

RCPT TO:<you@example.com>
250 OK

DATA
354 Enter message, ending with "." on a line by itself
Hello World
.
250 OK

QUIT
221 mail.example.com Closing transmission channel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment