Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

December 22, 1999 12:00 AM

How can I send mail to a SMTP server using Telnet?

Windows IT Pro
InstantDoc ID #13653
Rating: (1)

A. A. As with POP3, SMTP messages can also be sent using telnet by connecting to port 25 on the SMTP server, e.g.

C:\> telnet smtp.savilltech.com 25

Once connected you optionally announce to the server who you are (this is needed for some SMTP servers)

helo <domain>
e.g. helo savilltech.com

vrfy <user account>
e.g. vrfy john

Once you are verified you can commence to write an e-mail message. The first command is mail and you specify who it is from, e.g.

mail from:<billg@microsoft.com>

The address has to be in <>. Next you have to specify who will be receiving the message using rcpt, e.g.

rcpt to:<john@savilltech.com>

The from and to have been completed you can start the body of the message using the data command. You have to create the header information in the first lines of the message. Once you have completed the message enter a '.' on a blank link and the message will be sent. Below is an example creating a message.

Click here to view image

As you can see I entered a from, date, to and a subject and then entered the body of the text. Make sure you don't make a mistake as if you backspace this is enterpreted as a bad character and will be rejected. If a message is rejected a rejection will be send to the address specified in the "mail from:<...>" and for this reason you should only ever put your e-mail address. Although I have used a different address as a joke you should NEVER do this.

Below is how the message looks when received in Outlook 98:

Click here to view image

The above shows how easy it is to send a message and make it look from a different address but if you examined the header you would easily see it was sent from a different mail server and rumble its a fake (and a very bad one)!

I shall be adding future entries describing how to STOP people sending mail from your server (as they probably can at the moment).

For full information on SMTP and the commands you can use see Request For Comments 821.


Related Content:

ARTICLE TOOLS

Comments
  • tjockis
    6 years ago
    Jan 26, 2006

    it doesnt work for me....

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.