There are lots of articles online that will teach you, "How to connect to a mail server using telnet and send an mail." Lots of them have good information on SMTP command syntax. The problems start when you are trying to do something that is hard or can't be done using telnet. Because of this I wrote this handy telnet replacement tool for debugging SMTP. Below are the top reason to use this to test with instead of telnet.
- Authentication - Sending encoded strings using telnet requires you to build the authentication strings yourself using a mime tool. This tool has authentication built in so you can just specify the user name and password.
- TLS Encryption - This tool has the ability to connect using SSL directly or issue the StartTLS command and work securely.
- Telnet protection - Many servers do not allow commands to be send one character at a time. When they detect this they will disconnect you thinking you are a hacker. This tool will buffer the response while you type and send the full command when finished.
- Multihomed IP Address selection and binding - Telnet will always use the main IP on the machine. When using this tool you can choose from any IP address on the local machine. This makes trouble shooting IP address reputation issues very easy. For example if a single IP is black listed you can easily test using that IP.
- Remembering SMTP Commands - This tool has macros built in for MAIL FROM, RCPT TO, DATA, and many other commands so you don't need RFC 2821 with you while testing.
The SMTP Server Connection Diagnostics Tool, released by SocketLabs, Inc. can be found here: http://www.socketlabs.com/smtp-server-connection-diagnostics-tool/