Lucius Digital: Sending html mails in Drupal 8/9 programmatically. An example Drupal module including Twig template

Sending html mails in Drupal 8/9 programmatically. An example Drupal module including Twig template
Last month we implemented a user story for our Drupal distro OpenLucius: we needed to send clean html from Drupal 9 modules. This should also be scalable, as in: different modules should be able to mail different content in a consistent template. After some time of coding and trying different modules and options within those modules, we finally got it together in a nice, clean and scalable way.