How to send a email message using Telnet

Occasionally I’ve had to troubleshoot sending email messages to a particular SMTP server by simulating a mail client (or .NET mail code) by using the telnet client. Here’s how I do it on Windows:

  1. open the command prompt
  2. type: telnet smtpserver.domain.com 25 <press enter>
  3. type: helo server.com <press enter>
  4. type: mail from: you@domain.com  <press enter>
  5. type: rcpt to: someone@domain.com <press enter>
  6. type: data <press enter>
  7. write a test message. Typically I type something like: hello world! <press enter>
  8. to send the message type a single period (.) on a line by itself and of course <press enter>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s