Quoted strings in email addresses are incorrectly parsed by lookup->normaliseHeaders #910
-
If I understand well, there is a little problem in the method After studying this issue, I found that there are two PHP functions with the aim of parsing address lists: In order to adapt Mailer to the new API, I have written a very light alternative |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Can you please clarify which cases of address strings do you consider a "must have" to be supported? I ask so we can get a good understanding of what is required to normalise fields in MIME headers. As is so often the case, we only aim to support a useful subset of features, we don't want to support everything that is technically possible in RFC2822. |
Beta Was this translation helpful? Give feedback.
-
I agree, RFC2822 is a monstrosity!
In my experience I have seen only three common cases:
(These are also the only forms used as examples in the Annexes of RFC2822.) The first two are presently supported by Instead, I do not consider "addresses groups" a "must have": never seen in the wild (I added them to my function only because I realised that they required only one line more 😊). |
Beta Was this translation helpful? Give feedback.
-
I'm very sorry it took so long to fix the bug. We talked a few months ago about a suitable software design, thank you Giovanni for your feedback and your ideas. Here's what we came up with. The mail handling in the core extension has been updated. The new API for developers offers a couple of normalisation methods. To make a developer's life easier, but also to make the source code less error-prone. You don't have to use them... but I would say it's highly recommended... unless you have your own normalisation methods.
Should be fixed now, please let me know if this solution works for you. |
Beta Was this translation helpful? Give feedback.
I'm very sorry it took so long to fix the bug. We talked a few months ago about a suitable software design, thank you Giovanni for your feedback and your ideas. Here's what we came up with. The mail handling in the core extension has been updated. The new API for developers offers a couple of normalisation methods. To make a developer's life easier, but also to make the source code less error-prone. You don't have to use them... but I would say it's highly recommended... unless you have your own normalisation methods.
$this->yellow->lookup->normaliseAddress()
on an individual address. Which makes sure that an individual address has special characters removed, at the mo…