Installing the "Telent" client for Window 7
To Install the "Telnet" client on a Windows 7 computer use these steps.
- Open the Control Panel
- Click on Programs
- Click on Turns Windows Features on or off
- select the box of "Telnet" client
- Click OK and close the Control Panel
Install the "Telent" client for Server 2008 R2
To install the Telnet client on Windows Server 2008 R2 use these steps.
Open a PowerShell windows and run the following command.
PS C:\> Import-Module servermanager PS C:\> Add-WindowsFeature telnet-client Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True No Success {Telnet Client} |
Sending Email from the command line via "Telnet"
Open a command prompt and use Telnet to connect to the remote email server on port 25
C:\> telnet remotedomainaddress.com.hk 25 |
If Telnet is able to connect to the remote server, you should see the following message from remote email server.
220 remotedomainaddress.com.hk ESMTP (58ee44f84383b3426daf5dc72a084f92) |
Send the HELO command to remote email server
helo <test.com> 250 remotedomainaddress.com.hk Hello <test.com> [123.123.123.123], pleased to meet you |
Use MAIL FROM command to tell the remote server who the email is from
mail from: <test@test.com> 250 Sender <test@test.com> OK |
Use RCPT TO command to tell the remote server who to deliver the email to
rcpt to: <test@remotedomainaddress.com.hk> 250 Recipient <test@remotedomainaddress.com.hk> OK |
Use data command to start email content
data 354 Start mail input; end with <CRLF>.<CRLF> |
Use SUBJECT and then type your subject line, and press enter.
subject: testing email |
Type any text you want to include with the message, press enter, and then finally type a period “.” and press enter to send the email.
this is email content. . 250 OK: queued as E108A2E40AC |
Type the QUIT command to terminate the connection when you’re done.
quit |