Fixing mail_alert to be optional