changed email_type to integer