fix TYPE_TO usage in Email class