Sending Emails Through Telnet with SMTP.

Hello guys, today lets talk about sending an email. What, an Email? You might be thinking that who in this techno savvy world does not know about sending an email while there are many people who really dont know but i am not talking about conventional email. What i am referring here is the method of sending email through telnet in Kali Linux/Windows.

The method of sending mail through telnet is a bit different from conventional method of sending a mail. In this method we will be sending mail through the terminal/command prompt.
To completely understand about this method we first need to understand about Simple Mail Transfer Protocol (SMTP).
According to Wikipedia Simple mail transfer protocol is a internet standard for email transmission. First defined by RFC 821 in 1982, it was last updated in 2008 with the Extended SMTP additions by RFC 5321 -which is the protocol in widespread use today.
SMTP by default uses TCP Port 25. The protocol for mail submission is the same, but uses port 587. SMTP connections are secured by SSL encryption, known as SMTPS, default to port 465 non standard but sometimes used for legacy reasons.


There is basically no need for this method to exist but still it exists and i specially think everyone should know how in the previous times mails were sent without the presence of advanced mail clients and apps.

Sponsored Links

Let’s Come to the explanation

Step By Step guide.

Below are some information that i will be using in this guide.

SMTP Server:
SMTP port:               465
Authentication details
UserName:               [email protected]
Note: You can use either 25, 465, 587. Most of the email SMTP servers use these as default.

If you are going to use this method on Windows the telnet client is disabled by default you will need to enable it read this “How To Enable Telnet In Windows“.

1. In the introduction i told you that SMTP uses ports 587,465,25 by default but my server recommended me to use port 465 so i am gonna use it.

telnet -z ssl 465

Note: here “-z ssl” tells the telnet to use SSL encryption it can be accessed by installing and add-on in Kali by the command below.

sudo apt-get install telnet-ssl

Most of the email service providers use SSL encryption so it is necessary to use SSl or you will not be able to connect.

if you get a message with code “220” you are connected and can proceed further.

2. Now lets say hello to the server


if you get message with code “250” you are ready to go.
some servers also accept “helo” in place of “ehlo”

3. Now lets start with the log in procedure. First we need to check that if server we connected to supports log in or not for that the above step will help if after above step in the output you see anything like “auth login” or “auth” then the SMTP server for the mail provider you connected to is correct and do support login.

after verifying type in:

auth login

It will give a message with code “334” with some letters written at end. if you see the message that means you did it right and now you need to type in your encoded user name. You can get your user name encoded on the site ““. The encoding is necessary because telnet does not understand the normal characters it has to be in UTF-8 encoding

Sponsored Links

4. After you enter your encoded user name and press enter it will again give you some encoded message with code “334” now this time it is your password that you have to enter. Keep in mind your password should be encoded too.

5. As soon you do everything right you will get another message with code “235” and written “Authentication Successful”

6. Now goes the specifying of recipient and sender to the telnet and for that type the commands given below one by one.

mail from:<[email protected]>

It will give a 250 okay message.

It will again give 250 okay message.

7. Now comes the creating of the mail for our recipient part and for that type in the command bellow


if it gives a message with code “354” that means you need to type the body of the email now.

Start typing and start with subject

Subject: Testing the mail.


I am sending this mail to tset the
telnets mail sending feature.

Thank You
Your Friend


Do you Notice the period/dot at the end of the body that tells the telnet that you are finished with the body and telnet sends the message and displays you the message with code “250” Message Received. Mean your message is sent.

and type in


To close the telnet window.


This was all about sending mail through Telnet in Kali and Windows.
In the next post i will be explaining about How to Check Mail Through Telnet.
If you have any doubts please comment or contact me from Here.

Please see the video for detailed visual explanation.

Sponsored Links

2 thoughts on “Sending Emails Through Telnet with SMTP.

Leave a Reply

Your email address will not be published. Required fields are marked *