MODIFIED: mail.py. Script now explicitly returns exit code 1 if send_mail() function fails (returns False).