telnet is a program which makes a tcp connection to anouther port on anouther machine.
any keys you type into telent will be sent down the connection as raw data.
and any raw data which the machine sends to you will be echo's into the window.
to telnet can do anything, providing that you understand the protocol.
telnet (your_smtp_server) 25
and then have a conversation with the server....
for example, this conversation sends an email from address1 to address 2
[chris@local chris]$ telnet (my_smtp_server) 25
Trying (my ip address)...
Connected to (my smtp server).
Escape character is '^]'.
220 mta09-svc.(my_server).com ESMTP server (InterMail vM.4.01.03.37 201-229-121-137-20020806) ready Thu, 13 May 2004 14:05:16 +0100
214-This SMTP server is a part of the InterMail E-mail system. For
214-information about InterMail, please see http://www.software.com
214- Supported commands:
214- EHLO HELO MAIL RCPT DATA
214- VRFY RSET NOOP QUIT
214- SMTP Extensions supported through EHLO:
214- EXPN HELP SIZE
214-For more information about a listed topic, use "HELP <topic>"
214 Please report mail-related problems to Postmaster at this site.
HELO (MY IP ADDRESS)
MAIL FROM (my_email)
501 Usage: MAIL FROM:<sender>
250 Sender <(my_email)> Ok
250 Recipient <(my_email)> Ok
354 Ok Send data ending with <CRLF>.<CRLF>
how are you today ?
this is a test email
250 Message received: 20040513130654.KOYJ23020.mta09-svc.(my_server).com@[(server_ip)]
221 mta09-svc.ntlworld.com ESMTP server closing connection
Connection closed by foreign host.
(obviously ive cencorwed my email adds, ip adds and servernames.
and all the lines that start with a number starting from "Escape character is"
are the server talking... and all the lines that do not start wit a number down from "escape char is" were typed by me.
dont you love the smtp protocol ?
you can do this with prett much anything that communicated in plain text.
telnet yahoo.com 80
that will send you html text.