The syntax for establishing a raw network connection using telnet is this:
telnet {domain_name} {port_number}
So telnet to your SMTP server like
telnet smtp.mydomain.com 25
And copy and paste the below
helo client.mydomain.com
mail from:<[email protected]>
rcpt to:<[email protected]>
data
From: [email protected]
Subject: test mail from the command line
this is test number 1
sent from the linux box
.
quit
Note: Do not forget the "." at the end which represents the end of the message. The "quit" line exits to end the session.
To know about Linux join the Linux training
Do check out the video below