Send emails Using Telnet
Let us see how to send emails using command line client like Telnet, PuTTY etc. This is very useful while troubleshooting email sending issues in Mail client like Outlook Express, MS Office Outlook etc.
Sending emails using telnet by following video and text tutorial ensures that an email will land in recipient’s Inbox, and also there will be no issue of blank From, To and subject fields.
Step by step procedure for sending emails using telnet:
- Open Command Prompt
- Type “telnet your_smtp_server smtp_port” and then press enter. The SMTP banner message will greet you.
220 SMTP Server Ready
- Type HELO command followed by your computer name and press Enter.
- Type EHLO command followed by your domain name.
250 AUTH LOGIN
- Depending upon what kind of SMTP authentication is supported by your SMTP server and which method you would like to use issue appropriate command. My server requires AUTH LOGIN method where it asks for username and password separately in Base64 encoded format so I issued AUTH LOGIN command. Other authentication methods are AUTH PLAIN, AUTH CRAM-MD5
- In “334 VXNlcm5hbWU6“,Â VXNlcm5hbWU6 stands for “Username:” in other words SMTP server is prompting for Username which must be Base64 encoded. So, I supplied my usernameÂ bWFpbEBkb21haW4uY29t and then press enter.
- In “334 UGFzc3dvcmQ6“,Â UGFzc3dvcmQ6 stands for “Password:” in other words SMTP server is prompting for password which must be Base64 encoded. So, I supplied my passwordÂ bWFpbA== and press enter, in response to this if username and password are correct then it will say “235 authenticated.”.
- Enter “MAIL FROM: <your_mail_id>” command and then press enter. Server response will be “250 OK”
MAIL FROM: <email@example.com>
- Enter “RCPT TO: <recipient_address>” command and then press enter. Server response will be “250 OK”
RCPT TO: <firstname.lastname@example.org>
- Enter “DATA” command and then press enter. Server response will be “354 OK, send.”
354 OK, send.
- Supply information as shown below, so that when email received by recipient it must show From address, To address, Subject etc., press enter at the end of each line. These information is also important to send the mail in recipient’s Inbox and not in Spam box.
From: “Technology” <email@example.com>
To: “Recipient” <firstname.lastname@example.org>
Subject: THis mail is sent from Telnet Client
- Enter contents of email body i.e. actual message. At the end of message please enter “.” excluding double quotes to end the “DATA” command and submit the mail in mail queue of SMTP Server for delivery to the recipient.
How r u?
This mail is sent from Telnet Client. Please verify if it lands in your mailbox.
250 Queued (209.306 seconds)
- Enter “quit” command when all mails are sent and the session with SMTP server needs to terminate.