-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Lack of RFC 1342 support for IdHeader #109
Comments
Eek, is this something you actually encountered? It's weird because the control characters are part of the encoded RFC1342 parts as well. It definitely doesn't follow RFC 1342 being there from my understanding:
And from RFC-2822 (3.6.4, Identification Fields), defines the header as:
And earlier:
Now, that being the case -- if you can confirm this exists in the wild (and not just something you thought of) I'd be inclined to support it at some point if it's relatively common, and if I can rework my code to do so... this one may be particularly annoying though, because normally even if mime-encoded parts are allowed, they're usually outside of the control characters -- so <=?us-ascii?Q?..... (with the < first, not =?us-ascii?Q?<). |
Yes, I got such headers from existing raw message, what was read from gmail (through gmail api). As workaround I decoded these headers (and in-reply-to header as well) with mb_decode_mimeheader. |
I made a small example: phpmailer + gmail message-id gives such result. |
In that case though, it looks to me like the problem is in setting up the References header using phpmailer. The example calls 'addCustomHeader', so phpmailer isn't doing something special with the header, it just thinks it should encode the whole string (maybe because it sees the <> characters? Or maybe it just does that by default?) Maybe there's a way to set the header with phpmailer and not force encoding it, which would mean the References header would then be standards-compliant. It doesn't convince me that this exists commonly, but I'm happy to keep this open for yourself/others to add on to this, +chime in if it does indeed exist like that in the wild and something needs to be done. |
And how about first advantage of this library?
|
Thanks for the link, that confirms it to me. Yeah, I'm not against adding it, just wanted to establish it exists in the wild that way. The issue you posted also mentions apple mail doing it that way and has a good discussion about it generally. |
Fixed in master, will release in a few days unless an issue is reported. |
Released in 1.2.1 |
https://tools.ietf.org/html/rfc1342
Example header:
Expecting result:
getIds()->getValue() method should return decoded values.
Actual result:
getIds()->getValue() method return encoded values.
The text was updated successfully, but these errors were encountered: