Telnet to a mail server ; testing, relaying, etc...
In Windows go to “Start”, and click on “Run”. Then type “cmd”. This will pop up a Dos window. On the command line type “telnet”. This will bring up the telnet client. To connect to a site type “open [the dns of the site or ip] [port]”. What is a port? Imagine a great board of holes all with numbers above them. This is your connection. If you have a firewall most of these “holes” would be closed. Your internet connection uses ports to transfer data to certain programs or “services”. We will be using port 110 (pop3) and 25 (smtp).
SMTP – To Send Mail
To send mail:
Bring up telnet
Type “open (your mail server here) 25”
This will connect to your mail server on port 25 (the smtp port) SMTP stands for Simple Mail Transfer Protocol.
Type “HELO (site you want the mail server to record you connecting from…this can be anything you want)” Some mail servers do not require this line.
If you want the mail server/receiver of the email to know who this email is from type “MAIL FROM: yourname@whereever.com (replace this with whatever you want)” Note: Some mail servers require this line…if you get an error that blank sender is not allowed than use this command.
To tell the mail server where you want your mail to go to type “RCPT TO: (where you want the mail to go)”. *Warning: If you incorrectly enter the destination of the mail it will be sent to the postmaster of the receiving server (usually the mail server will give you an error informing you that the user does not exist and that this message will be sent to the postmaster).
Then type “DATA”
The mail server will give you specific instructions on how to terminate the message (usually a “.” on a line by itself) you must use this or else you will not be able to send the message!
Type your message
Then terminate the message with the appropriate character
At this point you generally type “QUIT” to disconnect as your message is sent.
Notes:
Some mail servers may not allow “relay” that is sending the mail to a non-local address. If this is the case you will generally get a message saying that relay is not allowed. Also some servers require smtp authenthication using a username/password. I haven’t encountered this before but if it does then maybe you can use the commands for accessing mail above?
Mail servers do not “echo characters” that is you will not see what you type. Do not think that telnet/mail server is not working…this is normal.
The “Delete” key does not work…therefore you cannot correct typing errors. If you make a mistake then all you can do is disconnect and restart or try again (if it was a password/username).
After sending an email and viewing the commands I noticed that when my server contacted hotmail’s server it used “EHLO” instead of the standard “HELO” I described above. Try this if the other one does not work?