Cygwin provides a Linux-like environment on Windows, but unfortunately the heirloom mailx (aka nail) email utility is not included as a supported package. I previously recommended mailx for quick command-line email in Linux. For Cygwin users, a similar utility is included in the Cygwin “email” package. Thanks to Dean Jones and any other contributors for providing this useful tool. You can view the latest README and source code on the eMail GitHub repository. Here is an example for quick command-line email sending in Cygwin:
echo 'Test message body text. Sincerely, You' | email -V -f 'FromAddress@Domain.Com' -n 'From Name' -s 'Test Subject' -r 'SMTPServer.Domain.Com' -a 'FileToAttach.ext' 'Recipient1@Domain.Com,Recipient2@Domain.Com'
This example assumes that you want to set a specific SMTP email server and from address on the command-line for your outgoing message. For full details, see the official project site and repository linked above. The tool does come with standard command-line help and a manual page. Good luck with quick email output on your Cygwin shell scripts :-).