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:
- Open the command prompt
- type:
telnet smtpserver.domain.com 25
<press enter> - type:
helo server.com
<press enter> - type:
mail from: you@domain.com
<press enter> - type:
rcpt to: someone@domain.com
<press enter> - type:
data
<press enter> - Write a test message. Typically, I type something like:
hello world!
<press enter> - To send the message, type a single period (
.
) on a line by itself and of course, press enter