Using telnet to test your SMTP server
Use a telnet client to telnet to your mail server on port 25
telnet mail.mydomain.com 25
You should see a prompt like the the following:
220 mail.mydomain.com ESMTP server ready.
Enter the standard SMTP greeting with your hostname
You should see the following reply:
250-mail.mydomain.com Hello mail.testdomain.com; ESMTPs are:
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 mail.mydomain.com Service closing channel.