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
CakePHP Mailer does not allow multiple headers of the same name #12523
Comments
Changing the existing behavior of |
How about |
I would prefer add parameter |
@garas Modal flags on methods are not an API pattern I'm a huge fan of. It requires memorizing the API or looking at the documentation to understand what the flag does. |
Break it for 4.x? |
|
2nd param as BC flag for 3.x sounds reasonable if we can then fix it for 4.x using merge default true. Separate methods could work for both major versions, though. |
Adding a new method for the append operation is my preference as it requires the least churn overall. |
One way to solve this without any API changes would be allow providing the value as array: ->addHeaders(['o:tag' => [$newsletter->get('id')]]) The, subsequent call like ->addHeaders(['o:tag' => ['swissmailer']) would merge the values for that particular header.
|
@ADmad I like that approach over breaking the existing behavior. |
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
CakePHP Version: 3.6.x
What you did
What happened
Ending up with just
o:tag: swissmailer
Duplicate headers are allowed for specific types and third party headers. See https://stackoverflow.com/questions/18039142/email-legitimate-duplicate-email-header-keys-with-mutually-exclusive-values
What you expected to happen
Getting all the headers in the email.
The text was updated successfully, but these errors were encountered: