Thursday, October 20, 2011

Setting up email on Cygwin

I couldn't find the mail command on Cygwin. Finally, this what I had to do:

Install email from Cygwin setup.exe.
setup.exe - email is present in the Mail Category packages.

Configure email.conf:
cp /etc/email/email.conf ~/.email.conf
vi ~/.email.conf (change the following lines)

SMTP_SERVER = 'smtp.yourdomain.net'
MY_NAME = 'Sweet Seattle'
MY_EMAIL = 'kirkland.is.awesome@gmail.com'


That's it. You are ready to send emails now:
grep @rest.route rest.py | sort | email -s 'REST calls' somewillsomewontsowhat@takerisks.com

Remember that if you don't configure the email.conf, you'll get an error "sh: /usr/lib/sendmail: No such file or directory" because it's expecting to use sendmail.

1 comment:

  1. The other option is using mutt:
    echo "work on parsing this" | mutt -s "sample Metrics file" -a Performance.json json.parser@gmail.com

    ReplyDelete