Friday 12 January 2007

Sending Email via Telnet

Pull up your Terminal program and run Telnet, I am using Terminal on my Mac but on Windows XP use the CMD Shell. At the prompt type the following:

>telnet mailserver 25 (mailserver is the name of your mailserver and may look something like this: mailgate.chollie.com)

After receiving the answer prompt, type:

>helo domainname (for example: helo chollie.com)

Following the response enter your email address:

>mail from: emailaddress (mail from sjc@chollie.com)

After the ‘250’ response you need to enter the recipients email address:

>rcpt to: emailaddress (rcpt to barney@rubble.com)

You’ll see a message confirming that the recipient is OK, you can now input your message.

>data (then press enter)

Type your email message and end it with a blank line followed by a single period (.) on a line by itself. The email server will conform with a message that says something similar to ‘Message Accepted for Delivery’

Type ‘quit’ to exit Telnet.

This may not be the most elegant way of sending an email but it is useful to know and can be used anywhere on any device that supports Telnet. It is also very useful to understand how the process works behind the scenes.

"Enquire not what boils in another's pot." - Thomas Fuller