How to test an SMTP server by using telnet

What you need

What to do

The intial telnet: > symbolises 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 mx1.example.com smtp
telnet: Trying 192.0.2.2...
telnet: Connected to mx1.example.com.
telnet: Escape character is '^]'.
server: 220 mx1.example.com ESMTP server ready Tue, 20 Jan 2004 22:33:36 +0200
client: HELO client.example.com
server: 250 mx1.example.com
client: MAIL from: <sender@example.com>
server: 250 Sender <sender@example.com> Ok
client: RCPT to: <recipient@example.com>
server: 250 Recipient <recipient@example.com> Ok
client: DATA
server: 354 Ok Send data ending with <CRLF>.<CRLF>
client: From: sender@example.com
client: To: recipient@example.com
client: Subject: Test message
client: 
client: This is a test message.
client: .
server: 250 Message received: 20040120203404.CCCC18555.mx1.example.com@client.example.com
client: QUIT
server: 221 mx1.example.com ESMTP server closing connection

Google’s use of the DART cookie enables Google to serve ads to you based on your visits to this and other websites. If you do not wish to use the DART cookie, please opt out on the privacy policy page for Google’s ad-and-content network. Additionally, you can usually specify your cookie preferences in your browser settings.

Any trademarks or registered trademarks mentioned on this site belong to their respective owners. Conventional hyperlinking to this site is welcome. However, none of the content on this site may be shown, even partly, in a context inferring or claiming it to be part of or sponsored by any other organisation or site. Such prohibited techniques include (but are not limited to) framesets, interstitial pages, kiosk mode pop-ups and reverse proxies. — For information on advertising, please click on the ‘Ads by Google’ or ‘AdChoices’ link next to any advertisement.

54.90.240.74 ec2-54-90-240-74.compute-1.amazonaws.com
(none) CCBot/2.0 (http://commoncrawl.org/faq/)
/misc/telnet-troubleshooting/smtp.shtml /misc/telnet-troubleshooting/smtp.shtml Tuesday, 02-Sep-2014 01:47:19 GMT