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

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top