send email from console or cmd using telnet

A simple way of verifying the connectivity and right functionality of your mail server. This is done in ubuntu. The same should work for windows also.

The commands are highlighted

pandian@Kannan:~$ telnet smtp.myhost.com 25
Trying 209.237.134.152…
Connected to mymail.myregisteredsite.com.
Escape character is ‘^]’.
220 mymail.myregisteredsite.com ESMTP
HELO myhost.com
250 mymail.myregisteredsite.com
MAIL FROM: pandian@myhost.com
250 ok
RCPT TO: pandian@myhost.com
250 ok
DATA
354 go ahead
Subject:-subject-

test body content.
.
250 ok 1335470983 qp 3750
QUIT
221 mymail.myregisteredsite.com
Connection closed by foreign host.
pandian@Kannan:~$

‘telnet’ is not recognized as an internal or external command

By default, telnet client or telnet server is not running in windows vista. we may need to enable them.

just enable it : Click Start, Control Panel, Programs, and then Turn Windows Features on or off. In the list, scroll down and select Telnet Client. Click OK to start the installation.

Thanks http://trycatch.be/blogs/scratchthesurface/archive/2007/04/15/vista-telnet-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file.aspx