vicker313 tech blog

June 5, 2009

Send mail using telnet

Filed under: Linux, Server, Windows — Tags: , — vicker313 @ 8:20 am

Some SMTP server allow you to send anonymous email (or even fake email), by using telnet. Telnet is available in both Windows and Linux.

  1. In your command prompt or terminal, issue following command:
    telnet smtp_server port
    smtp_server is either IP address or URL of the server, while port is the SMTP port of the server. The port normally is 25, but the server admin can change it to other number. Following is a example,
    telnet smtp.servername.com 25
  2. After login (if success), it will show a 220 something message without any prompt sign. Just type the following command and enter:
    helo domain_name
    domain_name is the host name of the server.
  3. Type in following command to set sender’s email address (any address, exists or not exists).
    mail from: sender_email
  4. Type in following command to set recipient’s email address.
    rcpt to: recipient_email
  5. Type in following command to trigger the starting of a message. This means you can start typing your message after this command.
    data
  6. When the message is finished, type . (single dot) to end the message and email will be sent out.
  7. Type quit to logoff.

Aware that any typing error (and backspace for correction) might result a command syntax error.

Create a free website or blog at WordPress.com.