Preheat the oven to 325 (F).
Put the flour, cocoa, sugar, baking powder, salt, and butter in a freestanding electric mixer with a paddle attachment (or use a handheld electric whisk) and beat on slow speed until you get a sandy consistency and everything is combined.
Whisk the milk, egg, and vanilla together in a pitcher, then slowly pour half into the flour mixture. Beat to combine, and turn the mixer up to high speed to get rid of any lumps.
Turn the mixer down to a slower speed and slowly pour in the remaining milk mixture (scrape any unmixed ingredients from the side of the bowl with a rubber spatula. Continue mixing for a couple more minutes until the batter is smooth, but do not overmix.
Spoon the batter into the paper cases until two-thirds full and bake in the preheated oven for 20-25 minutes, or until the cake bounces back when touched. A skewer inserted in the center should come out clean. Let the cupcakes cool slightly in the pan before turning out into a wire rack to cool separately.