Send SMTP mail using Telnet

telnet mail.companyname.com 25
helo mail.companyname.com
mail from: tom@companyname.com
rcpt to: xyz@yahoo.com
data
subject: My subject
This is a test message
.
quit