戰地連結︰ Home My Flickr NBA.com About

2008年8月21日星期四

Sending test email through Telnet

Overview

How to test if a SMTP server function properly in sending email? The simplest way is to send a test email. In this blog I will talk about how to send a simple test email by Telnet to the SMTP server.

Reference

How Simple is SMTP?

Steps

  1. Start a Telnet connection to the SMTP server by using the following command in command prompt:
    telnet $smtp_server_ip$ $port$
    Note that the ip & port is separated by a "space" but not "colon", For SMTP server, the port is "25"
  2. Once the connection is established, type in "HELO" or "EHLO" before enter other commands
  3. After saying hello, we can use the following command to specify the email sender:
    MAIL FROM: sender@domain.com
  4. Next we can specify the receiver by the following command:
    RCPT TO: receiver@domain.com
  5. Now the last thing to do is entering the mail body, you can enter your mail after sending this command:
    DATA
  6. After you enter command "DATA", the server will tell you to enter mail and indicate how to end the mail body. Follow it and the server will reply that your email is on its way!
  7. After all is done, enter "QUIT" to close the connection.

沒有留言: