How to use Telnet to test SMTP communication

When you run the commands, replace these values with ones for your SMTP server, sourceDomain, etc.

Destination SMTP server:
Source domain: dev.prodDomain
Sender’s e-mail address:
Recipient’s e-mail address:
Message subject: Test Mail
Message body: This is a test message

(1) Open a Command Prompt window, type telnet, and then press Enter. This command opens the Telnet session.
(2) Type set localecho, and then press Enter. This optional command lets you view the characters as you type them, and it might be required for some SMTP servers.
(3) Type set logfile <filename>, and then press Enter.This optional command enables logging and specifies the log file for the Telnet session. If you only specify a file name, the log file is located in the current folder. If you specify a path and file name, the path needs to be on the local computer, and you might need to enter the path and file name in the Windows DOS 8.3 format (short name with no spaces). The path needs to exist, but the log file is created automatically.
(4) Type OPEN 25 and then press Enter.
(5) Type EHLO dev.prodDomain, and then press Enter.
(6) Type MAIL FROM:<>, and then press Enter.
(7) Type RCPT TO:<> NOTIFY=success,failure, and then press Enter. The optional NOTIFY command specifies the particular delivery status notification (DSN) messages (also known as bounce messages, nondelivery reports, or NDRs) that the SMTP is required to provide. In this example, you’re requesting a DSN message for successful or failed message delivery.
(8) Type DATA, and then press Enter.
(9) Type Subject: Test Mail, and then press Enter.
(10) Type This is a test message, and then press Enter.
(11) Type a period ( . ), and then press Enter.
(12) To disconnect from the SMTP server, type QUIT, and then press Enter.
(13) To close the Telnet session, type quit, and then press Enter.

Here’s what a successful session output using the steps above looks like:

C:\> telnet
Microsoft Telnet> set localecho
Microsoft Telnet> set logfile c:\TelnetLog.txt
Microsoft Telnet> OPEN 25
EHLO dev.prodDomain Hello [], pleased to meet you
250-SIZE 37748736
250 2.1.0 Sender OK
RCPT TO: <> NOTIFY=success,failure
250 2.1.5 Recipient OK
354 Start mail input; end with <CRLF>.<CRLF>
Subject: Test Mail

This is a test message.
250 2.6.0 <> [InternalId=5111011082268,] Queued mail for delivery
221 2.0.0 Service closing transmission channel


How to Import/Export Putty configurations in Windows


Run the below command on a source system (For Backup/Export existing session list)

regedit /e “%userprofile%\desktop\putty-sessions.reg” HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

To copy the putty-sessions.reg file on remote system, click the right mouse button on file & merge it.


Exporting Registry Files
To export all or part of the registry remotely, use Registry Editor. Once you have opened Registry Editor, you can export the registry to a text file. You can use a text editor like Notepad to work with registry files you create by exporting. Registry files are saved with .reg extensions, and text files are saved with .txt extensions.

(1) Open Registry Editor. If you want to save only a particular branch, select it.
(2) On the File menu, click Export….
(3) In File name, enter a name for the registry file.
(4) In Save as type, select the file type you wish to use for the saved file
(5) In Export Range, use the radio buttons to select whether you want to export the entire registry or only the selected branch.
(6) Click Save.

Importing Registry Files
The Import… command in Registry Editor can import registry files of all types, including text files
(1) Open Registry Editor.
(2) On the File menu, click Import….
(3) Find the file you want to import, click the file to select it, and then click Open.