Command line script to send emails