HOW TO USE SMTP VIA TELNET

Email is sent with SMTP (defined in RFC 821) which has been assigned the well-known port 25. Knowing this, we can use Telnet to directly connect to, and place mail directly on, any mail server in the world. The only tools required are a telnet prompt and a recipient's email address. No email program, text editor, or browser required.

Let's say we want to send a message to george_lucas@starwars.com. At a command prompt simply type:

telnet smtp.servername.com 25

Don't forget the port number. If you don't specify the port number and the sysadmin has set up any security, you'll either get an access denied message or some sort of message stating your intrusion has been monitored. If you inadvertantly forget the port number and instead get a Connected to... message, you've just broken into that server, hopefully you are not using that company as your ISP!

Anyways:

telnet smtp.servername.com 25

After a moment you should get a response that includes the mail server's IP address, a Connected to message, followed by a line stating the mail program being used and the time.

To send your message:

mail from: <your email address> ; in this case george_lucas@starwars.com
(wait for sender OK message)
rcpt to: <someguy@someisp.net> ; recipient email address like jarjar@starwars.com
(wait for recipient OK message)
data
(wait for Enter mail message)
.

Then type in your message. You can type as many lines as you like as long as your very last line is a period all by itself. You will receive an OK message with a mail ID number.

quit

leaves telnet.

ADDITIONAL SMTP COMMANDS

EXPN <anyname> will give an alias's destination address or will give the names of everyone in a mailing list
VRFY <username> will give information on a particular user

back to YAMS