Thursday, October 3, 2013

How to send email through telnet command to SMTP server?

Assumption
SMTP Server : [SMTP_SERVER]
Client Machine Name : [CLIENT_MACHINE_NAME]
Email From: [EMAIL_FROM]
Email Recipient: [RCPT_TO]

Steps to use telnet command to send email through SMTP server

1. Type in telnet command as described below to connect to the SMTP server.
telnet [SMTP_SERVER] 25
2. Type in the command below to introduce yourself to the SMTP server. For example, "hello localhost"
helo [CLIENT_MACHINE_NAME]
3. Type in the command as described below to set the email address that used to send email.
MAIL FROM:[EMAIL_FROM]
4. Type in the command below to set the recipient gmail id
RCPT TO:[RCPT_TO]
5. Enter the command "DATA" to proceed with composing the email body.
DATA
6. Enter the email body and follow by '.' to trigger email sending
Hello Testing!
.

No comments: