Thursday, 1 September 2011

Check Mail Server Using Telnet on windows command line

Hi,

I had someone ask today how to check if a mail server was working. So here is how to do it using telnet from the command line.

The idea here is that you know the mailserver domain, and you know a valid email address that can send from that domain.

Open your command window and type telnet. If you get an error, open control panel, click programs, then click "turn windows features on or off"

In the box that pops up, select the telnet options. Let it install, close you command window and re-open it then type the following:

telnet MAIL_SERVER_NAME 25 
EHLO google.com 
MAIL FROM:valid@emailaddress.com 
RCPT TO: me@myaddress.com 
DATA 

Subject: test message from server name 

This is a test message you will not see a response from this command. 
QUIT


You should receive the mail. 

If any of the above commands produce an error, something is wrong. 

thanks, 

Paul