How to send an email via telnet

Run the command telnet [host] port
for example:

-telnet mail.domain.tld 25
Right after the connection is established we will get a message like this: 220 hostname ESMTP
so we give the command :

-(if the servers has authenticaton for smtp you will have to give “auth login” first, you can use this decoder: http://www.dillfrog.com/tools/base-64_encode/)

then put whos the sender:
-MAIL FROM: myemail@domain.tld
and you will get a: 250 ok

and then the recipient:
RCPT TO: test@domain2.tld
and you will get a: 250 ok

Type the command: DATA press enter (you will get a message like this: 354 go ahead)
Type Subject: [the text you like] and press enter

and then type the text you like for e.g.: this is a test message

when you finish enter a dot “.” and press enter ( you will see something like this 250 ok 1193664081 qp 17483)

then type Quit