Friday, July 31, 2009

How to send email using telnet command

It's handy to know how to send email using Telnet command, especially for debugging purpose. 

FYI, many people out there do not even realize that emails are sent via tcp/ip port 25 protocol. They told me in order to test, they need a Outlook or Thunderbird client. Those are technical people. :)

cclow@ohost:~>telnet 25
Connected to
Escape character is '^]'.
220 -- Server ESMTP (Sun Java(tm) System Messaging Server 7.0-0.04 64bit (built Jun 20 2008))
250 OK, [].
250 2.5.0 Address Ok.
250 2.1.5 OK.
354 Enter mail, end with a single ".".
subject: test only

helo test test test
250 2.5.0 Ok, envelope id
221 2.3.0 Bye received. Goodbye.
Connection to closed by foreign host.


No comments:

Post a Comment