Oftentimes it is very helpful to remove your mail server from the equation to see if there is an underlying network / reputation problem blocking mail flow. Here’s how you can manually send a test message using the telnet command built into every operating system. You’ll need to determine the name or address of your recipeints mail server. You can do this by looking up their MX record at http://mxtoolbox.com. In my example the MX record is a1.mx-route.com. Your commands are in bold below and the responses I got are in italic. Be careful, on Windows if you typo you cannot backspace and correct yourself. Just hit enter and retype the entire command.
telnet a1.mx-route.com 25
Connected to a1.mx-route.com (188.8.131.52).
Escape character is ‘^]’.
220 a1-1.mx-route.com ESMTP
mail from: <email@example.com>
250 sender <firstname.lastname@example.org> ok
rcpt to: <email@example.com>
250 recipient <firstname.lastname@example.org> ok
354 go ahead
Subject: Test Message
This is a test message.
250 ok: Message 156715331 accepted
Connection closed by foreign host.
Here you can see that the sender, recipient and message were accepted by the 250 responses from the recieving mail server. If there are problems you will see them reflected with 4xx or 5xx responses that can be very helpful for figuring out the problem.
A few of our readers had asked for an explanation of the above commands, here ya go!
telnet a1.mx-route.com 25 Use the telnet command to connect to a1.mx-route.com on port 25
Trying 184.108.40.206… Trying to connect
Connected to a1.mx-route.com (220.127.116.11). Connection was successful
Escape character is ‘^]’. The server is telling you how to hang up. In this case you press Control-]
220 a1-1.mx-route.com ESMTP This is called the banner. The server is telling you some more about itself and letting you know that it is your turn to talk. In this case the 220 means that it’s a good connection, the machine’s name is a1-1.mx-route.com and it can talk using the ESMTP protocol.
helo mxtoolbox.com We are saying hello to the machine and telling it our domain name. I can use the domain name to reverse lookup our IP and make try to make sure we aren’t spoofing somebody else and that we are reputable.
250 a1-1.mx-route.com The server is saying okay (250 means good) and again telling us it’s name.
mail from: <email@example.com> I would like to send you a message from <firstname.lastname@example.org>.
250 sender <email@example.com> ok The server seems to be agreeable to this idea (again 250 means good). It can use several methods to decide if it wants to accept a message from you.
rcpt to: <firstname.lastname@example.org> I would like to send the message to <email@example.com>.
250 recipient <firstname.lastname@example.org> ok The server again is okay with this transaction so far.
data I am ready to send you the message data.
354 go ahead Server says okie dokie.
Subject: Test Message The message subject.
This is a test message. Some text.
. The period all by itself is the signal that we are done sending message data.
250 ok: Message 156715331 accepted The server has successfully (250 again) accepted the message and assigned it ID 156715331.
quit We are done now. You can close the connection.
221 a1-1.mx-route.com The server agrees. . Good bye.
Connection closed by foreign host. The server has closed the connection.