Telnet Sample to Send an SMTP email

I am always forgetting how to test sending an email through an SMTP gateway using the Telnet client.  So rather then googling it all the time why not add it here!

The initial telnet: > symbolizes your shell prompt.

The empty line between the headers and the body is important,
as is the line containing only a full stop at the end of the article body.

telnet: > telnet 25
telnet: Trying
telnet: Connected to
telnet: Escape character is '^]'.
server: 220 ESMTP server ready Tue, 20 Jan 2004 22:33:36 +0200
client: HELO
server: 250
client: MAIL from: <>
server: 250 Sender <> Ok
client: RCPT to: <>
server: 250 Recipient <> Ok
client: DATA
server: 354 Ok Send data ending with <CRLF>.<CRLF>
client: Subject: Test message
client: This is a test message.
client: .
server: 250 Message received:
client: QUIT
server: 221 ESMTP server closing connection

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!