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.
- Install cygwin if you don't have it. (It's handy if you are familiar with the linux toolchain!).
- Install
eximandemail. You can both search for it in the searchbox, or expand "mail" item and find them manually. - Run
exim-configand thenemail-configin cygwin command line. It's very straightforward to configure. Choose SMTP server, with no authentication, no TLS in theemail-config.
And that's it. Try echo This is a test email | email -s "test" foo@bar.com to test.
Update:
- Replace
emailtosendmailin ubuntu. - This post solves the problem of extremely slow
sendmailin ubuntu.
Comments