Monday, April 27, 2009

How to check SMTP is working or not.

For testing SMTP server functionality, we have to follow some steps to identify that whether SMTP configured or not. Below are the steps we need to follow to check SMTP server functionality. We are using the command prompt telnet to test the server.

1. open command prompt and type :
telnet <servername> 25
Note: 25 is the port used by SMTP and <servername> is the SMTP server name.
After you hit enter you will get some output like
220 <servername> Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at
Tue, 22 Jan 2008 09:10:27 -0600
It means you got response from the SMTP server and it's the clue that SMTP is setup on the server.

2. For testing response say helo to it.
Type :
helo <servername>
250 <servername> Hello [IP Adress]

3. Now we need to enter the From address of the mail.
Type :
mail from:
250 2.1.0….Sender OK

4. It's time to enter the recepient email address.
Type : rcpt to:
250 2.1.5

5. Now we are left with the data of the email. i.e. subject and body.
Type : data
354 Start mail input; end with <CRLF>.<CRLF>

6. Type:
subject: this is a test mail
This is test mail body
I am testing SMTP server.

7. Hit Enter, then . and then Enter.
250 2.6.0 <<servername>C8wSA00000006@<servername>> Queued mail for delivery

8. Type: quit
221 2.0.0 <servername> Service closing transmission channel

If you did everything as explained, you will get a mail soon.

1 comment:

  1. while sending email i am getting ..we do not relay