SiteRecon Server and Web Site Monitoring ServiceSiteRecon Home Page
About Us | Account | Contact Us | Feedback | Home | Login/Logout | Privacy | Support | Terms |
View Cart

Testing a SMTP sever using Telnet

The functional status of SMTP servers can be verified by using Telnet to send a test message. Why would you ever use such an unfriendly interface to send email? Telnet provides the ability to communicate directly with the SMTP and bypass all other components such as email clients, gateway, etc. From a computer with an internet connection and Telnet, use the following steps to send a test message.

1. Execute Telnet by typing Telnet domain-name 25 then pressing enter. This command instructs Telnet to execute and opens a port 25 connection to the domain specified. The exact server response is contingent upon the email system being used. The critical response item is the first few characters that indicate the status code. For this step a status code of 220 indicates the server is available to service your request.

220 ESMTP MDaemon 9.6.2; Tue 18 Sep 2007 05:38:37 -0400

2. The e-mail server now expecting you to identify yourself by entering helo your-id then pressing enter. Just about any string will suffice for identification including your login id, first name, computer manufacture, etc. The status code returned by this command should be 250 indicating handshaking has taken place.

250 Hello, pleased to meet you

3. Next enter mail from: email address@domain then pressing enter. Most SMTP servers require the email address to be valid and from the actual SMTP domain you are connected to. This is done as a security feature to limit email relays by unauthorized users. Note: a space exists between from: and the email address. Once entered, you should see a status code of 250 indicating handshaking has taken place. A status code of 550 indicates unauthorized user.

250 Sender email address entered, Sender ok

4. Next enter the recipients email address by entering rcpt to: address@domain then pressing enter. You should see a status code of 250 indicating the email address has been accepted.

250 Recipient email address, Recipient ok

5. Next we need to inform the server we wish to enter the message text by typing data then pressing enter. You should see a status code of 354 indicating the data command has been accepted.

354 Please start mail input, end with CRLF . CRLF

6. Next enter the subject line of the message by entering subject: xyz123 then pressing enter twice. The server will not return a status code.

7. Type the message test. Once completed, press enter, type a period, and press enter again. This sequence tells the server you have completed the message. A status code of 250 indicating the message is ok and queued for delivery.

250 Mail queued for delivery.

8. Type quit and press enter to stop Telnet communications with the server. A status code of 221 indicating the connecting is closing should be displayed.

221 closing connection see you in cyberspace

Common SMTP Status Codes

Code Description
200 Non-standard success response
211 System status message
214 Help message formatted for human reader follows
220 SMTP service ready
221 Service/connection closing
250 Successful request. Action completed.
251 Recipient is not local to the server, but the server will accept and forward the message
252 Recipient cant be verified, but the server will accept the message and attempt delivery
354 Indicates the server is ready to accept a message once you’ve entered From and To
421 Service is not available and connection will be closed
450 Requested command failed because the recipients mailbox is unavailable
451 Command has been aborted due to a server error
452 Command has been aborted because the server has insufficient system storage
500 Server could not recognize the command was due to a syntax error
501 Syntax error was found in command arguments
502 Command was not implemented
503 Server has encountered a bad command or sequence of commands
504 Command parameter is not implemented
521 Domain does not accept mail
530 Access denied
550 Command failed because the users mailbox was unavailable
551 Recipient is not local to the server
552 Action was aborted because storage allocation was exceeded
553 Action was aborted because the mailbox name was invalid
554 Transaction failed


Using Telnet to test the operational status of SMTP servers is a simple way to troubleshoot mail delivery. The bonus, Telnet is included with most operating systems.

About the Author

Lew Newlin is CTO of Information Solutions, Inc. that operates SiteRecon that specializes in email monitoring and web site monitoring for businesses.

Webmasters/Ezine Publishers

You are granted permission to re-publish this article on your website or publication. The only requirement is that you include the complete article, links, and byline.

Article in MS Word format
Article in PDF format

14-Day Free Trial

Evaluate SiteRecon website monitoring service and email us for a 14 day free trial of our Premium Plan!

Baseline Statistics

 Cisco is Site Down
 CNN is Ok
 Dell is Ok
 eBay is Ok
 MS is Ok
 symantec is Ok
 Yahoo is Site Down
View baseline reports
 RSS Feeds*CAP Feeds*Atom Feeds

Free Tools

Port Assignments

Web2Pin (Blackberry PIN msg)


Virtual Citadel
Web2Pin - Blackberry Pin message solutions
Copyright © 2002 - 2007 Information Solutions, Inc. • SiteRecon™, LifeguardEOC™, and Web2Pin™ are trademarks of Information Solutions, Inc.