photo credit: TalkingTreeWhen troubleshooting email, it may be necessary to see what the email server is spitting out, just to make sure everything is working. The easiest way to do that is to use the telnet command. Telnet allows you to connect to various services on remote or local machines through the command line. Today we are going to be using it to send some email. You'll first need to bring up the command-line on your respective operating system. First see if telnet is installed. Type:
And you should see something like this:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Since that works, type quit to exit telnet. Next, we need to open a connection to our mail server. We will need to know the name or ip address of the mail server:
telnet mail.example.com 25
(The 25 is the port number that SMTP runs on.) You should then get a response back from your mail server:
Trying 10.0.0.18... Connected to mail.example.com. Escape character is '^]'. 220 mail.example.com ESMTP Postfix
The server is now waiting for a command. We need to say Hello. (* For the remaining examples I'm going to use the domain example.com. You'll need to replace that with your local domain name. *)
The mail server now needs to know who is sending the email:
mail from: [email protected]
Who are you sending the mail to?
rcpt to: [email protected]
Now it is time to tell it the message:
354 End data with .
Enter your message:
Subject: test message This is a test message .
To end the message, you need to put a period at the beginning of the line and hit the return key. Now your message is on its way!
Now type quit to exit
: http://creativecommons.org/licenses/by-nc-sa/2.0/ "Attribution-NonCommercial-ShareAlike License"