Problem/Motivation
This module has policy config and GUI that allows customising outgoing mails precisely. We can add many headers, with lots of flexible options. Filters can apply with a very specific granularity for a certain type of mail, or a single filter can apply widely saving duplication.
Various contrib modules also do the same in a more limited way: only some headers and each maybe in a limited way. Example modules:
- Contact can set to.
- Simplenews can set from, priority, email receipt.
- Webform can set to, from, cc, bcc, reply, etc
- Commerce can set bcc and from
We can use the Symfony Mailer policy throughout, reducing code duplication and create a consistent admin experience. This can work even in "Proxy Mode", when the EmailBuilder is part of this module.
Proposed resolution
General framework:
- #3262882: Policy importing
- #3272683: Policy importing GUI
- #3262883: Extend address policy elements
- #3270172: Address policy should support multiple addresses
- #3263870: Add view/edit of related policy to existing config/settings forms
- #3263447: Extend hook_mailer_bc_alter() to allow altering 'to' and 'reply-to' (we would ignore the passed value if we are using policy instead).
For each module #3265253: Add policy listings to module entity/settings forms:
- Alter the module configuration form (for the contact form, newsletter, etc) to remove the settings that duplicate policy and instead provide a link to edit the Symfony Mailer policy.
- Remove code from the EmailBuilder relating to these settings/headers.
- Write a policy import function to read the old settings and write corresponding policy.
Comments
Comment #2
adamps commentedComment #3
adamps commentedComment #4
adamps commentedComment #5
adamps commentedComment #6
adamps commentedComment #7
adamps commentedComment #8
adamps commentedComment #9
adamps commentedComment #10
adamps commentedComment #11
adamps commentedComment #12
adamps commentedComment #13
adamps commentedComment #14
adamps commented