Using telnet to test your SMTP server: Difference between revisions

From RSWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Use a telnet client to telnet to your mail server on port 25
Use a telnet client to telnet to your mail server on port 25

Line 70: Line 68:
''221 Service closing channel.''
''221 Service closing channel.''

[[Category:Technical| ]] [[Category:Web| ]]

Revision as of 06:59, 4 May 2016

Use a telnet client to telnet to your mail server on port 25

telnet 25

You should see a prompt like the the following:

220 ESMTP server ready.

Enter the standard SMTP greeting with your hostname


You should see the following reply: Hello; ESMTPs are:


250-SIZE 0

250 HELP

We now need to tell the server who the mail is from. Type in the following:


You should see the following response:

250 Sender OK - send RCPTs.

Now we need to enter the name of a recipient. Type in the following:


For some SMTP servers you may need to enclose the recipient e-mail address with <> as in the following:


You should see this response:

250 Recipient OK - send RCPT or DATA.

We are going to send some data so simply enter the following:


You should now see this response:

354 OK, send data, end with CRLF.CRLF

Now we enter our subject. After giving the subject you can hit enter and type a quick message. To send the message press enter after your last sentance and on a new line with a blank line above simply enter a full stop(period) on its own as the example below shows:

Subject: Test Message
This is a test message.


You should now recieve the following response:

250 Data received OK.

Thats it! All done and the mail has been sent. All that is needed is to issue the last and final command:


And now we recieve the final output before the telnet session terminates:

221 Service closing channel.