Skip navigation
2009

Emilio Moretti's Blog

May 2009 Previous month Next month
  1. Type “telnet”, hit Enter.
  2. Type “open mail.YourDomain.com 25″ (replace YourDomain.com with your domain name. And replace the default port 25 if necessary), hit Enter.
  3. Type “HELO”, hit Enter.
  4. Type “AUTH LOGIN”, hit Enter.

Your telnet window should look like the following now.

Telnet email

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”.

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 FROM:YourUserName@YourDomain.com size=100″ (replace YourUserName@YourDomain.com with your full email address. The size should be properly computed but I was lazy so I simply put in 100 and it worked on my mail server), hit Enter
    Enter “RCPT TO:DestinationEmail@DestinationDomain.com” (replace DestinationEmail@DestinationDomain.com with the destination email)
  2. Type “DATA”, hit Enter
  3. Type “Subject:Sending email using Telnet”, hit Enter
  4. Type “”  (Send a blank line to separate the headers from the message body), hit Enter
  5. Type “This is just a simple test.”, hit Enter
  6. Type “.”, hit Enter

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

SMTP email

Check your mailbox or if you sent it to somebody else ask that person if he or she receive the test email. :)

Notes:

  • 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”.
  • If the mail server responded with something like “550 You have sent no HELO! Please see RFC 2821 section 4.1.1.1″ to your HELO command, then you can try supplying your domain name following HELO. For example “HELO localhost.com”.
  • Some mail servers do not require the “size” attribute and will respond with something like “501 username@domainname.com size=100: malformed address: size=100 may not follow username@domainname.com”. In this case just drop the size attribute.
  • 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.

 

 

I am no expert in SMTP email protocols, the above are just some guidelines to get you started. Have fun with SMTP emails and telnet!

 

 

 

 

 

(sí, es un sucio copy/paste)