[11.x] Add ListManagementOptions in SES mail transport #50660
Merged
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.
Description
Amazon SES provides a convenient feature allowing the inclusion and management of unsubscribe links and headers in outgoing emails by specifying a contact list name and an optional topic name. When the
ListManagementOptions
header is passed, it substitutes the {{amazonSESUnsubscribeUrl}} placeholder with a one-click unsubscribe link in the email body.References:
Similar to symfony/symfony#53901, this PR proposes adding
ListManagementOptions
in the headers of SesTransport and SesV2Transport.Usage
Follow the AWS instructions to create a contact list
Optional: add a topic to the list
Add
X-SES-LIST-MANAGEMENT-OPTIONS
in the headerUpon merging this PR, a PR for updating doc will be submitted if necessary.
Note
While it's possible to utilize the options array within the
ses
configuration to include theListManagementOptions
header, it wouldn't offer the same level of dynamism.