Add extension hook to control file attachments per recipient and field #1252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per the title, adding an extension hook where developers can control if an uploaded file should be attached to an email, for each recipient and each upload field separately.
This will allow for further control e.g. for extensions that control email attachments per upload field (some could be sent, some shouldn't) or per recipient (internal staff, external processors etc.) and other combinations.
The list of attachments is not changed at this point as it's required for other extension hooks on the whole email where the access to recipients or email attachments is not possible (especially with Symfony Email once attachment is added it can't be easily removed).
Ref. #1203
As this is adding new extension point it's targeting
6
for6.2.0
but if we saw that as a partial way how to address e.g. the issue where CMS recipients may not have access to the file then I'd be happy to retarget and get it out in a patch as soon as practical to avoid using the fork for now.