updating to send email, can be run from a cron job