Tuesday, June 16, 2009

Sending Email using Telnet / How to check email server

While working with Oracle SOA, for every project we may need to configure the SMTP set up with the oracle SOA Server.
You have the SMTP server information with you, how to make sure the mail server is working fine.

So we can run a simple test to make sure the mail server is working fine. Please try the below steps.

1. Open a command prompt and enter as below to connect to mail server using telnet.
telnet mailserverdomain 25 ( 25 is the default port number)

You may receive a response from the mail server as below

220 mailserverdomain Microsoft Exchange Internet Mail Connector

2. Say hello to the server.

HELO mailserverdomain [You may get the response as below ]
250 mailserverdomain Hello mailserverdomain, pleased to meet you

3. MAIL FROM:yourmail@domain.com
250 2.1.0 Sender OK

The from address should be informed to the mail server.
4. RCPT TO: yourmail@domain.com

250 2.1.5 Recipient ok
The Recipient address should be informed to the mail server.
5. DATA
This command tells the server that we are going to send data from now on.
DATA
354 Enter mail, end with "." on a line by itself
6. SUBJECT: THIS MAIL IS SENT USING TELNET [This line is used to set the subject line for the mail]
SUBJECT: THIS MAIL IS SENT USING TELNET
Hit the enter key 2 times.
7. Then start your body part message for the mail. Once you entered the message for the body part terminate with a period.
THIS IS THE BODY MESSAGE
.
250 2.6.0 Message accepted for delivery
8. To come out of the telnet connection enter the "QUIT" keyword.
221 2.0.0 acsmt358.oracle.com Closing connection

This will terminate the telnet session. Watch your mail box for the mail that you just sent from telnet.

I hope the above post is useful. Please leave your comments to improve the post and for my learning if there is any mistake.

1 comment:

  1. Anonymous2:13 AM

    How can you resolve if you get the response for MAIL FROM:yourmail@domain.com as Invalid address. However, I can sent mails to this address from SMTP pickUp folder by dropping a text file with TO : FROM: mentioned in it.

    ReplyDelete