Skip to content

Instantly share code, notes, and snippets.

@westphahl
Last active December 11, 2015 21:29
Show Gist options
  • 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 '[email protected]' | 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:<[email protected]>
250 OK

RCPT TO:<[email protected]>
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