How to Send an Email Through Command Line

Save

Email is sent to a recipient using a protocol called simple mail transfer protocol (SMTP). This protocol runs on servers throughout the Internet and on servers within a private network. You can use a command line and telnet session to send mail from one of these servers. Some servers require a password to send the email, but many are open to allow anonymous sessions. Once connected to a server, you enter a few commands, and the email is sent.

Things You'll Need

  • SMTP server access
  • Click the Windows Start button and select "Run." Type "cmd" into the text box and press the "OK" button. This opens the command line prompt.

  • Type "telnet <server_name>" into the command line. The "<server_name>" can be an IP address or a fully qualified domain name. For most public networks, the SMTP server is named "smtp.some_server.com."

  • Type "ehlo" into the command line. This command responds with your IP location and user name and password if you were required to enter one.

  • Type "mail from:<your_email>" into the command line. Replace "<your_email>" with your email. Now type "rcpt to:<recipient_email>" into the command line. This is who should receive the email.

  • Type "data" into the command line and then press "Enter." This prompts you to enter the full text for the email. When you've completed the email, type "." at the last line. This denotes the ending of the email. At this point, the email is sent.

  • Type "quit" to exit the telnet session and stop the email process. It may take several minutes for the recipient to receive the email, depending on the size of the email queue.

References

  • Photo Credit Jupiterimages/Pixland/Getty Images
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!