Using Telnet to test mail connections
- Open a telnet* session: From a command prompt, type telnet, and then press Enter. Note: If Telnet is not found, you will need to enable it in Programs > Turn Windows features on and off > Telnet Client
- Type set local echo on (on computers running Microsoft Windows® 2000 Server) or SET LOCALECHO (on computers running Windows Server™ 2003 or Windows XP/Vista/7/8), and then press Enter. (Local echo allows you to view the responses to the commands). For a list of available telnet commands, type set?
- Type o yourMailServer 25, and then press Enter
- Type EHLO yourMailServer, and then press Enter
- Type AUTH LOGIN and press Enter. The server responds with an encrypted prompt for your username
- Enter your username encrypted in base 64. You can use one of several online tools that are available (for example,
- http://www.base64encode.org/) to encode your username
- The server responds with an encrypted base 64 prompt for your password. Enter your password encrypted in base 64
- Type MAIL FROM: sender@domain.com, and then press Enter. If the sender is not permitted to send mail, the SMTP server returns an error.
- Type RCPT TO: recipient@remotedomain.com, and then press Enter. If the recipient is not a valid recipient or the server does not accept mail for this domain, the SMTP server returns an error
- Type DATA
- If desired, type message text, press Enter, type a period (.), and then press Enter again
- If mail is working properly, you should see a response similar to the following indicating that mail is queued for delivery: 250 2.6.0 INET-IMC-01UWr81nn9000fbad8@mail1.contoso.com
*You may need to enable telnet in Windows first using this info:
1. Right-click the Start button and select Programs and Features.
2. Click Turn Windows features on or off from the left-hand menu.
3. The Windows Features dialog box appears. Scroll down and select Telnet Client. ...
4. The Telnet Client installations begins.
5. Once complete, a success message appears.
6. Click Close.