Changed email switch name to email_flag