New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot modify email headers in SendNewsletterEvent
#6189
Comments
The You are right, however, that the event now lacks potentially relevant editing options. The following options are already available in the event:
For modifying email data, it would be conceivable to implement one of the following:
From my point of view:
If we can agree on a variant or if someone has a more effective solution, I can take care of the implementation. |
imo variant 1 is the only viable option.
|
We have not deprecated the |
Why? We need to support it for the remainder of Contao 5's lifetime and in Contao 6 the event's |
There is also a variant 1.1 in which the Contao email object is provided via an interface (e.g. The question is how much work and thought is actually required in this limited case (-> sendNewsletterEvent) and what is better discussed elsewhere (how to deal with A very strict solution might also be to explicitly exclude the modification of the e-mail message using the event. The user may still implement this via a custom message and transmission and deactivate the normal logic with |
What purpose would that have? i.e. why should we implement an additional layer?
Why would we want to restrict that? |
As discussed in the call we want to refactor the newsletter bundle to not use |
Affected version(s)
4.13, 5.0+
Description
In #3489 we introduced the
SendNewsletterEvent
as a replacement for thesendNewsletter
hook. Unfortunately we overlooked that the new event is much more limited compared to the hook as the event does not provide the actual email instance and thus one cannot modify other email meta data of the newsletter email anymore - likeReply-To
or other headers./cc @SeverinGloeckle
The text was updated successfully, but these errors were encountered: