SMTP authentication and send emails using Telnet

Today, let’s try to send an email using nothing but the Telnet client. This is a very good way to troubleshoot problems in sending emails in your email client such as Microsoft Outlook, and test the configurations for a new Accudemia installation.

What I listed below is the general commands that will work on most mail servers. If yours do not work, you will need to check what’s the mail server you are currently running and change the commands slightly.

  1. Go to a DOS prompt
  2. Type “telnet”, hit Enter.
  3. Type “open 25″ (replace with your domain name. And replace the default port 25 if necessary), hit Enter.
  4. Type “HELO”, hit Enter.
  5. Type “AUTH LOGIN”, hit Enter.

Now, you now need to enter your full email address and then your password encoded in BASE64. To convert your full email address and your password to BASE64, you can use this handy BASE64 encoding tool. Enter your email, click on “Encode”, copy that encoded value in the telnet session and press Enter. After that do the same for your password.

If your username (the full email address) and password are entered correctly, the mail server should respond with “Authentication successful”.

OK, so far so good. You have just authenticated yourself with the mail server and now can start entering the email details.

  1. Type “MAIL″ (replace with your full email address.), hit Enter
  2. Enter “RCPT” (replace with the destination email)
  3. Type “DATA”, hit Enter
  4. Type “Subject:Sending email using Telnet”, hit Enter
  5. Type “” (Send a blank line to separate the headers from the message body), hit Enter
  6. Type “This is just a simple test.”, hit Enter
  7. Type “.”, hit Enter

The server should respond with “250 OK”. Type “quit” and hit Enter to exit.

Check your mailbox to see if you have received the test email. :)


  1. If you entered the steps above wrongly or if you forgot one or two commands, the mail server might respond with “503 Bad sequence of commands”.
  2. If the mail server responded with something like “550 You have sent no HELO! Please see RFC 2821 section″ to your HELO command, then you can try supplying your domain name following HELO. For example “HELO”.
  3. Our test emails are likely to end up in the spam box, so make sure you look into that folder if you couldn’t find them in the inbox.
accudemia/hostingreq/testsmtp.txt · Last modified: 2014/06/17 10:36 by diego
Trace: testsmtp
CC Attribution-Noncommercial-Share Alike 4.0 International
Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0