How to send email using telnet

  • by
  1. Open your terminal.
  2. Now, connect with telnet using the following command:
    telnet smtp.domain.com 25
  3. Type ehlo example.com. Some servers also accept helo in place of ehlo.
    ehlo
  4. Type mail from: username@example.com:
    mail from: username@domain.com
  5. Type rcpt to: user@hotmail.com, user2@yahoo.com (replace with your actual recipient name):
    rcpt to: user@hotmail.com, user@yahoo.com
  6. To write the message – type data, followed by your subject and message. To end the message, put a period on a line by itself and press enter:
    data
    Subject: My Telnet Test Email
    Hello,
    This is an email sent by using the telnet command.
    Your friend,
    Me
    .
    
  7. Type quit to exit telnet.