Whisk together flour, baking powder, 2 teaspoons salt, and ¼ teaspoon pepper in a large bowl. In a separate bowl, stir together butter, eggs, and milk; add to flour mixture, and stir until just combined. Add ham, zucchini, and corn, and stir until well blended.Heat 1 inch of oil in a large cast-iron skillet over medium heat until it registers 350 degrees on a deep-fry thermometer.Working in batches of 4 or 5, gently drop two tablespoons batter into skillet for each fritter, pressing gently with a spatula to flatten. Cook, turning once, until golden brown, about 2 minutes per side. Transfer with a spatula or slotted spoon to paper towels to drain. Season fritters with salt and pepper while still hot.