SMTP, or rather Short Message Transfer Protocol, is the method in which most emails are sent from one server to another. The process is quite simple, you send a message from your email software, and that message is transported through an SMTP service (usually with your Internet provider), which then delivers the message to the correct server. The server at the other end then decided which mailbox to deliver the message to. The whole process usually lasts only a few seconds, depending on the size of the email. One of the most common email servers is Microsoft Exchange server, a piece of software that sits on your mail server and manages incoming as well as outgoing emails. You can learn about how to set up Exchange Server from many online courses, including this one from Udemy.
However, even if you’re an Exchange expert and have your server working smoothly, SMTP can go wrong from time to time. So having a number of SMTP test methods available is useful so you can troubleshoot the problem and find out exactly what’s wrong.
Method 1 – From the Command Prompt
You can manually test an SMTP connection directly from a command prompt in Windows. To do this, first open a command prompt by going to “run” from the start menu and typing “cmd”. In the command prompt, enter:
telnet mail.mailserver.com 25
Naturally to carry out the SMTP test on your own server, you have to replace [mail server] with the name of the mail server you’re testing. The number 25 is the port number most commonly used by SMTP. If however you know this is different, simply change the number.
You should get a response from the server that looks something like this:
220 mx.mailserver.com ESMTP
The actual reply you get will vary from server to server, but what you’re really looking for here is any reply at all. If you get a reply then at least you know the server is up, and that’s the first part of your SMTP test done.
You can now send a test email to make sure everything is working correctly. Please note that when using telnet the backspace key does not work correctly even though you can see it working on the screen. For this reason you need to enter the following perfectly.
ehlo mydomain.com mail from:<email@example.com> rcpt to:<firstname.lastname@example.org> data Test message, no response required . quit
Edit the mail from and rcpt to addresses to emails that you know work. The single period on the second to last line tells the telnet session that you’ve finished typing in data, and obviously quit tells it to close the session. Everything else is fairly self-explanatory. With any luck you should see an email appear in the relevant mailbox. Congratulations! If you’ve received the email, you have successfully carried out an SMTP test.
This type of test is probably the most fool proof method you can use as an SMTP test. It is communicating with the mail server at its most basic level. If you can manage to send an email in this way, there is no reason why any other method of sending (web client, email client) cannot manage to send an email. If other methods are failing after you’ve managed to successfully send an mail using this method from the command prompt, then you need to start looking elsewhere for the problem. For example, can your computers see the mail server across the network? They could be blocked by a firewall or some other issue. You can find out more about network troubleshooting on a useful course from Udemy.
Method 2 – Using an Online Service
Email is one of the most important aspects of the Internet in modern society, so naturally there are services available on the Internet to help anyone, whether they be IT professionals or not, make sure their services are working correctly. There are quite a few commercial paid for testing services, or you can simply use one of the free ones.
One of the best free ones out there is Wormly (www.wormly.com). If you have an email server already set up on the Internet, you simply have to fill out the IP address or the fully qualified hostname in one box, and in the subsequent boxes the email addresses you want to send the test email to and from. The website then carries out the test for you. It couldn’t be simpler than that, and this is a very easy and useful tool.
As an IT professional, I often use this tool and others just like it to quickly and easily test services. Sometimes just the verification that a service is working can save hours of troubleshooting and diagnostics. You can also carry out this SMTP test in front of a customer if necessary to prove to them a service is working.
Sometimes an email user might claim the email isn’t working when really it’s just something as simple as a stuck email in their outbox. Read here about what you can do if that happens.
Method 3 – Sending a Simple Test Email
Sometimes the most obvious solution is the best, and by that I mean if you want to test whether your server can send emails, just go ahead and send a test message. Usually if a customer or office department claims the SMTP server is down, the problem may be with the user or the software on the user’s computer, and not at the SMTP server itself. So before you start rooting about in the server room, send an STMP test email from a completely different computer (one that is trusted to work) and see if it sends correctly or not. Even if that doesn’t work, try another in case your test computer has a problem. Only if that fails do you need to start more extensive diagnostic procedures.
The best way to send an SMTP test email is to use a standard piece of software such as Microsoft Outlook. This is an industry standard email program that is fairly easy to use. If you need to, you can brush up on how to use this program effectively on this online course. Or you can just go right ahead and simply send an email. Make sure the software is pointing at the suspect mail server however. If necessary, you could do this on a laptop while monitoring the mail server itself. You should be able to see the logs in real time. This is usually possible with mail servers such as Microsoft Exchange, and even if you can’t monitor in real time, there are usually logs that can be investigated.
So there you have it, three sure fire ways of successfully testing your SMTP server to make sure everything is running smoothly. Usually I find it’s useful to run an SMTP test every day or every few hours just to avoid any unforeseen problems. It’s always best if the IT guys know a problem exists before the boss comes knocking on the door.
If time allows you can extend your SMTP test to include a POP3 or IMAP test as well, which will check to see if incoming emails are working correctly. This is all part of creating a well-maintained network. If you’re looking to install and maintain a healthy email server, then you might want to look into this course from Udemy – Planning and Implementing Exchange Server. It contains many useful tips and ideas on how to create a trouble-free system.