Skip to content

Remove useless attachment in emails (and improve skin template loading)

Maxime Besson requested to merge fix-email-attachment into v2.0

In 2.18.0 we improved email spaminess by removing logos by default. However, logos are still being attached to the email even if they are not displayed:


This MR:

  • removes the image completely from the template code
  • adjusts the corresponding unit tests

but that's not all, we still need to make sure image attachment works for those who use it

  • So I added a new unit test to make sure a custom template that uses images works fine (among other things)
  • And I added the possibility to override templates in unit tests through a hidden parameter named skinTemplateDir
  • 🆕 It's now possible to use custom templates in unit tests by dropping them in t/templates/

The skinTemplateDir might be a simpler solution to #2788 (closed) , but this is too late in 2.19 to make a firm decision about it. For now, i propose to keep it a hidden, undocumented parameter, and we can decide to add it in the manager at a later point

Edited by Maxime Besson

Merge request reports