send an read the mails through TELNET
« on: December 16, 2007, 09:34:49 AM »
Hi,

Below are the few command to read and send mails through TELNET:

To Send the mail via TELNET:


telnet Your mail server(mail.yourdomain.com) 25
220 mail.yourdomain.com
HELO
250 Your srver name Hello [Your IP address]
MAIL FROM: your email address
250 OK <your email address> Sender ok
RCPT TO: recipient email address
250 OK <recipient email address> Recipient ok
DATA
354 Start mail input; end with <CRLF>.<CRLF>
From: Your email address
To:recipient email address
Subject: SMTP commands demo
This is a demo of SMTP commands.

250 ok

To Read the mail via TELNET:


telnet Your mail server(mail.yourdomain.com) 110
+OK POP3 server ready <c363616d-690c-4202-a15a-bbb899d332ea>   
USER Your email address
+OK User:'Your email address' ok
PASS password
+OK password ok
LIST
+OK 43 messages <684964 octets>
1   689
2   2780
3   3083
|      |
|      |
43   129601
.
RETR 3 +OK 3083 octets
<The whole message will get displayed here>

I have consider Port 25 for SMTP and 110 for POP 3. If you are using the different port then just replace it.

Thanks,
« Last Edit: January 01, 1970, 05:30:00 AM by Kailash »