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:~$

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s