Skip to content

Instantly share code, notes, and snippets.

@floudet
Created July 17, 2016 14:45
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save floudet/75f3e089fd400c06abfc491b8098d158 to your computer and use it in GitHub Desktop.
Send a RFC 5322 compliant email using telnet
$ telnet mail.example.org 25
Trying XXX.XXX.XXX.XXX...
Connected to XXX.XXX.XXX.XXX.
Escape character is '^]'.
220 *********************************
ehlo server.example.org
250-mail.example.com
250-PIPELINING
250-SIZE 20480000
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: testsmtp@example.org
250 2.1.0 Ok
rcpt to: someone@example.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
from: TestSMTP <testsmtp@example.org>
to: someone@example.com
Subject: This is a test
This is a RFC compliant email sent using telnet.
Thank you!
.
250 2.0.0 Ok: queued as 9XXXXF80003
quit
221 2.0.0 Bye
Connection closed by foreign host.
@CSchulz
Copy link

CSchulz commented Nov 18, 2017

I think the creation date is missing.

@pablomujica
Copy link

I think the creation date is missing.

Without the date its already compliant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment