Wednesday, August 5, 2009

How to send email using telnet

At a command prompt, type telnet, and then press ENTER. This command opens the Telnet session.

Type set localecho and then press ENTER. This optional command lets you view the characters as you type them. This setting may be required for some SMTP servers.

Type set logfile . This optional command enables logging of the Telnet session to the specified log file. If you only specify a file name, the location of the log file is the current working directory. If you specify a path and a file name, the path must be local to the computer. Both the path and the file name that you specify must be entered in the Microsoft DOS 8.3 format. The path that you specify must already exist. If you specify a log file that doesn't exist, it will be created for you.

Type open mail.clientdomain.com 25 and then press ENTER.

Type EHLO computersupportforce.com and then press ENTER.

Type MAIL FROM:james@computersupportforce.com and then press ENTER.

Type RCPT TO:user@domain.com

Type DATA and then press ENTER. You will receive a response that resembles the following:

354 Start mail input; end with .
Type Subject: Test from Contoso and then press ENTER.

Press ENTER. RFC 2822 requires a blank line between the Subject: header field and the message body.

Type This is a test message and then press ENTER.

Press ENTER, type a period ( . ) and then press ENTER. You will receive a response that resembles the following:

250 2.6.0 Queued mail for delivery
To disconnect from the destination SMTP server, type QUIT and then press ENTER. You will receive a response that resembles the following:

221 2.0.0 Service closing transmission channel
To close the Telnet session, type quit and then press ENTER.

No comments: