Change script for email alerts