< -- BuySellAds Ad Code ALLEN -->
Windows Command Line

Send an Email from Command Line / Telnet

Sometimes it can be usefull to test that email is working quickly, if you have a problem with microsoft exchange this can be a good way of testing port 25 communications.Most servers do not have an email client on them so we need to do it from command line.

Here is a step by step guide to sending an email in telnet

    1. First open the command prompt
      ( Start > run > cmd)
    2. Then type:telnet mymailserver 25mymailserver” is the name of the mail server. This can either be the name of the server (netbios) or its fully qualified DNS name.  The number 25 is the port number that telnet is to connect on, smtp users port 25.
    3. Then enter:HELO .


    1. Then type:MAIL FROM: anemailaddress anemailaddress” is your email address. This is the address that the email will be sent from. You will see a  response starting with “250” and ending with “OK”.
    2. Then type:RCPT TO: recipientmailrecipientmail” is the email address that you will send an email to. You should get a response starting with “250” and ending with “OK”.
    3. Then type DATA then press return and then enter yur contentThis is the content of the email


    1. To show the end of your message enter a full stop (“.”) on its own on a line followed by pressing Enter.


  1. To close the telnet session enter:QUIT

Tags: email

Allen White

Allen is an IT Consultant and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5, 6 and HP ASE, AIS - Network Infrastructure.

Leave a comment



What Web Browser Do You Use?

View Results

Loading ... Loading ...


What do you prefer..VMware or Hyper-V?

View Results

Loading ... Loading ...