As an IT admin, you might find yourself in a situation where you need to test sending emails without an email client such as Microsoft Outlook. When that time comes, a great way to test SMTP connectivity is leveraging TELNET.
Here are a few easy steps to test mail flow:
- Make sure you know what SMTP server you are trying to connect to e.g. smtp.example.net.au or if it’s an internal mail server you can use the FQDN or IP address e.g. MAILSERVER.local or 192.168.1.1
- Make sure you have telnet installed on your client machine, you can do this via the following technet article
- Open up command prompt on your machine, click on start > run and type in cmd.
- In the command prompt window, type: telnet servername/IP 25 and press enter.
Note: telnet initiates a telnet connection, the server name is the mail server you are attempting to send mail from and 25 is the default SMTP port.
- Now type in the following to test mail flow:
Note: after each step press enter
- HELO mail server domain name e.g. HELO example.com
- MAIL FROM:email@example.com e.g. MAIL FROM:firstname.lastname@example.org
- RCPT TO:email@example.com e.g. RCPT TO:firstname.lastname@example.org
- Type in some test data, this will be the body of the email e.g. Hello Sir 🙂
- To stop typing in text in the body, you need to press Enter followed by a full stop . the press Enter again.
- QUIT to exit the telnet session