9/21/16

How To Send E-mail Using Telnet

To send an e-mail, basicly your computer connects to the remote mail server  and talks to it using SMTP (Simple Mail Transfer Protocol).

Previous blog was about sending e-mail with PowerShell. If you do not like PowerShell :S and want to use cmd, this can work for you.

You can use Telnet. To send an e-mail using Telnet;


Telnet  <smtp_server_ip>  25
HELO
501 Syntax: HELO hostname
MAIL FROM: test@test.com
250 2.1.0 Ok
RCPT TO: reccipient@test.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
SUBJECT: <Subject>

<body> .

(You must finish your e-mail with a dot (.) ) 

No comments:

Post a Comment