Using the Telnet client to open a SMTP session and/or send a message
Telnet can be used to open a SMTP session and/or send a message to MDaemon, or another server. This is normally used for troubleshooting issues with clients connecting to servers. The following steps will detail how to use telnet to connect to a server and/or send a message.
The IP address used for the mail server in this example is 192.168.0.1. You'll need to use your own IP address or host name in place of our example IP.
- In Windows open a command prompt window.
- From Command line, type: telnet 192.168.0.1 25 [enter]
- You should get a reply from the mail server you're connecting to. For example, a default MDaemon server would respond with: 220 mail.altn.com ESMTP MDaemon 16.5.0; Wed, 28 Sep 2016 07:11:08 -0500
- If telnet is not enabled on the client/server, please click the link below to enable the telnet client.
Install Telnet Client
- Next, give the HELO/EHLO command followed by enter: ehlo mail.company.test
- You should see a reply that starts like this: 250-domain123.example.com Hello mail.company.test, pleased to meet you
- Enter the return path for the message followed by enter: MAIL FROM: email@example.com
- The reply should be something like this: 250 <firstname.lastname@example.org>, Sender ok
- Enter the recipient for the message followed by enter: rcpt to: email@example.com
- The reply should be something like this: 250 <firstname.lastname@example.org>, Recipient ok
- Enter the data command followed by enter: data
- The replay will resemble the following: 354 Please start mail input.
- Enter the following lines, replacing the addresses with what you'd like to use (enter at the end of each line):
date: Wed, 28 Sep 2016 07:00:00 -0500
test message body
- The period on a line by itself tells the mail server that you're done transmitting the message.
- The replay from the mail server will look like the following: 250 Mail queued for delivery.
- Enter the command to end the session followed by enter: quit
- The replay from the mail server will look like the following: 221 Closing connection. Good bye.
- Close the command window.