<mj-include /> not working in a MJML template in Mautic v5

Your software
My Mautic version is: 5.2.1
My PHP version is: 8.2.20
My Database type and version is: MariaDB 10.5.18

Your problem
My problem is, i cannot seem to load CSS from an external file in my MJML template via . It is not considered neither in the GrapesJS builder nor in the rendered email. I tried e.g. “” where the mail.css was placed in /css/mail.css and the MJML template file in /html/email.mjml.twig.

I tried to fix the problem by inserting into the mj-head or the mj-body section, but neither worked.

Hello @alexnitsche

You can insert an external CSS file in this way:

<mjml>
  <mj-raw position="file-start">
    <link rel="stylesheet" type="text/css" href="{{ getAssetUrl('themes/'~template~'/css/style.css', null, null, true ) }}">
  </mj-raw>

This way it worked for me. Hope I helped you out.
Best regards,
Ricardo