Sending Emails from Cygwin

Googled a lot but couldn't find tutorials about how to send emails from Windows command line. After playing with the mail tools in Cygwin, found it's pretty straightforward and put it up here for future reference.

  1. Install cygwin if you don't have it. (It's handy if you are familiar with the linux toolchain!).
  2. Install exim and email. You can both search for it in the searchbox, or expand "mail" item and find them manually.
  3. Run exim-config and then email-config in cygwin command line. It's very straightforward to configure. Choose SMTP server, with no authentication, no TLS in the email-config.

And that's it. Try echo This is a test email | email -s "test" to test.


  • Replace email to sendmail in ubuntu.
  • This post solves the problem of extremely slow sendmail in ubuntu.