Sending an email message using telnet
This was blatantly borrowed from www.redantigua.com.
How to send a mail using telnet:
Telnet to port 25 on the server to communicate interactively with the SMTP server
(not sendmail-specific, but works with any SMTP server):
220 host.domain.com ESMTP Sendmail 8.12.1/8.12.1; Fri, 27 Oct 2001 08:56:37 -0800 (BST)
helo domain.com
250 host.domain.com Hello root@localhost, pleased to meet you
mail from: user1@domain.com
250 user1@domain.com... Sender ok
rcpt to: user2@another.domain.com
250 user2@another.domain.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
Reply-To: user3@domain.com
Subject: Test Message
Hello
.
250 IAA13263 Message accepted for delivery
Some notes:
- On the rcpt To: line, you probably want to use a recipient name that you know is valid on the
host you're connected to.
- Be sure you have a blank line between the header lines (Reply-to, Subject, etc.) and the
message body or the body won't show up in the message.
10/17/2002