Whisk the cocoa powder in a bowl with 225 ml (7½ fl oz) boiling water until smooth. Stir in the chopped chocolate and leave to cool, stirring occasionally, until the chocolate has melted.
Lift the bread pan out of the machine and fit the blade. Put the cake ingredients in the pan.
Fit the pan into the machine and close the lid. Set to the cake programme. After about 5 minutes use a plastic spatula to scrape the mixture down from the sides and from the corners of the pan.
Test the cake after 1 hour by inserting a skewer into the centre. If it comes out clean the cake is ready. If not, cook a little longer or complete the programme. Transfer the cake to a wire rack to cool.
Make the icing. Melt the chocolate in a small bowl and leave to cool slightly. Beat together the icing sugar and butter, then beat in the chocolate. Split the cake in half and sandwich with one quarter of the icing. Transfer to a serving plate and use a palette knife to spread the remaining icing over the top and sides.