changes to get email notifications to work