For the doughnuts, heat the milk, butter, and malt extract or sugar in a small pan gently so that the butter melts. Allow to cool to hand-temperature, then add the dried yeast. Stir to combine and leave for about 5 minutes.
In a large bowl, mix together the flour, beer, vanilla extract, and salt, then add the milk mixture. Combine into a dough and then knead for about 5 minutes—a stand mixer will help here as it’s quite a wet dough, but you can do it by hand (you might need to add a little extra flour, but the more flour you add, the breadier the doughnut will be). Place in a bowl, cover with clingfilm, and leave to rise in a warm place for 1–2 hours, until the dough has doubled in size.
When the dough has risen, knock it back and roll it out on a lightly floured surface into a rectangle about 1.5cm thick. Line a deep baking sheet with 6–8 squares of baking parchment, each a bit bigger than the doughnuts will be. Using a doughnut or cookie cutter (or just a small beer glass), cut out as many dough rounds as you can, then, if you want a ring doughnut, cut out a smaller hole roughly 3cm across in the middle (this will close up a bit as the dough expands during proving and cooking).
Place one doughnut on each piece of baking parchment on the baking sheet. Roll up the leftover dough and make extra doughnuts (or make some smaller doughnut “holes”). Cover the baking sheet with plastic wrap (clingfilm) or a clean towel and leave to rise in a warm place for 45–60 minutes, until the doughnuts are doubled in size.
If filling with jam, make it now. Put all the jam ingredients, apart from the cornstarch (cornflour), in a small pan over a medium heat. Bring to a simmer and cook for around 15 minutes until you have a thick, jam-like consistency, stirring regularly so it doesn’t stick to the pan. When it’s almost done, put the cornstarch in a small bowl and pour in a tablespoon or two of the jam liquid, stir to a thick paste, then add it back to the main mixture and cook for one more minute. Pour into a clean bowl and allow to cool and thicken.
When the doughnuts are ready to be cooked, get your deep-fryer or pan ready and heat the oil to 180°C. If you’re glazing the doughnuts, prepare the glaze while the oil heats up. Place the icing sugar in a jug or bowl and mix the beer and vanilla extract in until it’s the right consistency to stick to a doughnut—so not too runny, but runny enough to pour. If you want to sugar-coat the doughnuts, prepare a bowl with some sugar in.
Transfer two or three doughnuts from the sheet into the fryer, trying not to push any air out of them as you do so (that’s why they’re on baking parchment). Cook for a couple of minutes on each side, or until golden. Remove from the oil and place on paper towels to remove any excess oil. Repeat for the other doughnuts.
Sugar-coat them by rolling them in the sugar while still warm. To fill them with jam, let them cool first. Then push a chopstick or the handle end of a teaspoon into each doughnut and fill it with jam using a piping bag.