How to Send Email With Telnet
Telnet can be used as another way to send email.
|
Telnet mail.mydomain.com 25 220 mail.mydomain.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.211 ready at Fri, 4 Mar 2005 17:27:35 -0800 HELO mycomputer.mydomain.com 250 mail.mydomain.com Hello [192.168.168.90] MAIL FROM: me@mydomain.com 250 2.1.0 me@mydomain.com....Sender OK RCPT TO: you@yourdomain.com 250 2.1.5 you@yourdomain.com DATA 354 Start mail input; end with <CRLF>.<CRLF> Subject: test Message Body . <-- Note period 250 2.6.0 <MAILc1WGfLOG9ep40000031a@mail.mydomain.com> Queued mail for delivery QUIT 221 2.0.0 mail.mydomain.com Service closing transmission channel Connection to host lost. |
| HELO mycomputer.mydomain.com | The FQDN of the computer you're using. |
| MAIL FROM: me@mydomain.com | The address you want the mail to look like it's from. |
| RCPT TO: you@yourdomain.com | Whom you are sending an email to. |
| DATA | Type this to start your message. |
| Subject: test | Include a subject line if you so desire. |
| Message Body | Blah, blah, blah. |
| . | Full stop indicating end of email message. |
| QUIT | Goodbye |
Common Commands:
| HELO | Identifies sender to receiver based on hostnames |
| EHLO | HELO for ESMTP enabled servers. EMSTP server will respond with extensions it supports. |
| Initiates e-mail transfer with indication of originator | |
| RCPT | idnetifies one of the recipients. Multiples recipients require multiple commands. |
| DATA | Indicates messgae data to be sent in 1288-ASCII-Character |
| RSET | Reset. Recieved email is discarded. |
| VRFY | Asks receiver-SMTP tp verify email address identifies a user. |
| EXPN | Ask receiver-SMTP to confirm identity of a mailing list and return membership of that list. |
| HELP | Requests help on a command |
| NOOP | Requests receiver-SMTP to send an OK |
| TURN | Reverses roles of sender and receiver |
| QUIT | terminate connection. |
How to Check Email With Telnet
Telnet can be used as another way to check email.
|
Telnet mail.mydomain.com 110 +OK Hello there. USER me@mydomain.com +OK Password required. PASS XXXXXXXXXX +OK User successfully logged on. quit +OK Microsoft Exchange Server 2003 POP3 server version 6.5.6944.0 signing off. Connection to host lost. |
Common Commands:
| USER userid | Who you are. |
| PASS password | What your password is. |
| STAT | Any new mail? |
| LIST | Lists all your email on the server with a number and size. |
| RETR msg# | View message specified by number. |
| TOP msg# #lines | Show the first few lines, specified by #lines, of message. |
| DELE msg# | Delete message by number. |
| RSET | |
| QUIT | Exit. |
There are other POP commands. See RFC1939 which defines the POP commands and error codes.