Problem/Motivation
The French government has published an official DSFR-compatible email template on GitHub:
https://github.com/GouvernementFR/dsfr-mail
This repository provides a HTML email template following the Système de Design de l'État (DSFR) guidelines, including:
- responsive design,
- accessibility compliance (contrast ratios, font sizes, etc.),
- compatibility with major email clients (including Outlook),
- dark mode support,
- proper usage of the Marianne logo and government branding.
Since DSFR theme aims to offer a consistent and compliant experience for French public administration websites, it would be valuable to include this email template (or an adapted version of it) directly within the theme.
Would be great to have this as a starting point for any module/theme that needs to send official-looking transactional or notification emails in a DSFR-compliant way.
Issue fork dsfr-3576743
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
nickolajPatch implementing the official French government DSFR email template (from https://github.com/GouvernementFR/dsfr-mail) as a Twig template for Drupal's symfony_mailer module. Adds configurable service name and footer text in theme settings, with dark mode support and responsive design.
Comment #5
oulalahakabu commentedThank you @nickolaj for this really solid and thoughtful merge request — it's excellent work!
Just a quick question on the Marianne logo: I see you're referencing
marianne.pngthereThe only
marianne.pngI found in DSFR zip provided is atsrc/dsfr/layout/page/response/unavailable/asset/marianne.pngFor better consistency and to keep things automatic with standard DSFR installation instructions (extract dist/ to libraries/dsfr/),
Don't you think it would be preferable to link to this location ?
Thanks a lot for clarifying — and again, great contribution!
Comment #8
oulalahakabu commentedI closed my MR because the provided Marianne logo contains "République Française", which doesn't correspond to all French state services.
I'm currently checking whether it's possible to distribute the Marianne in the theme (licensing issues — it's a bit beyond me).
If that's not possible, I suggest we use the one already present in the DSFR distribution instead (
src/dsfr/layout/page/response/unavailable/asset/marianne.png).Comment #9
oulalahakabu commentedComment #11
oulalahakabu commentedIt appears that, legally, we cannot distribute the Marianne image under a free license.
Additionally, there is no truly reliable and permanent way to fetch it from an official library/source.
Therefore, I suggest letting the user upload their own preferred image to serve as the email header logo.
Comment #12
oulalahakabu commentedComment #14
oulalahakabu commentedComment #15
oulalahakabu commented