console script for sending mail