Rothamsted-Ecoinformatics / farm_rothamsted

Custom farmOS features for Rothamsted Research.
GNU General Public License v2.0
6 stars 1 forks source link

E-mail alerts: make rich text #626

Open aislinnpearson opened 6 months ago

aislinnpearson commented 6 months ago

Following on from issue #597, the e-mails currently render in plain text, which makes them look a bit chaotic (especially as outlook is prone to extending any links for security purposes). As part of the drive to improve usability, we would like to render these in rich text. See comments here:

mstenta commented 4 months ago

It looks like the modules that I used in the past (https://www.drupal.org/project/mimemail / https://www.drupal.org/project/htmlmail) do not have stable D10 versions... but this new one looks promising: https://www.drupal.org/project/symfony_mailer

I just learned that symfony/mailer (the underlying library that the Drupal contrib symfony_mailer module uses) was added to Drupal core in 10.2.0! https://www.drupal.org/node/3369935

I haven't fully wrapped my head around the details, but this may provide a way forward for Rothamsted's use of rich text emails.

There is a follow-up meta issue for Drupal core to start using the new dependency in more places, which may provide some more insight into what is possible for us: https://www.drupal.org/project/drupal/issues/1803948

mstenta commented 4 months ago

FYI I am in the process of changing over to symfony_mailer for all Farmier-hosted instances (instead of the SMTP module).

I haven't looked into how to send rich-text with it, but I think this means that the door is now open to that as a possibility.