[prev in list] [next in list] [prev in thread] [next in thread] 

List:       horde-dev
Subject:    [dev] Error parsing this To: field (potentially invalid?)
From:       Julian_Espérat <savageman86 () gmail ! com>
Date:       2020-02-28 9:19:53
Message-ID: CAA-xJJfEe8kK_ucwUse9oa=zMdW27_3QwH1hGBq97FBQzjXxGw () mail ! gmail ! com
[Download RAW message or body]

Hi there,

I am parsing emails, and I have one particular example that gives me
an empty "To" header where I believe it should (could?) work.

Here's the minimal sample to reproduce:

echo (string) (new \Horde_Mime_Headers_Addresses('To',
'"A=?utf-8?Q?Name=22?= <email@gmail.com>')); // empty string (expected: "A
name <email@gmail.com>")

The recipient display name is enclosed in quotes: the first quote is
not encoded, but the 2nd one is contained within an utf8-encoded
portion (before anyone asks: in my minimal sample, it doesn't make
sense to have this utf8-encoded portion, but it does in the email I'm
parsing).

The cause may well be a buggy email client that messed up the encoding
and did it badly, but it would also probably be nice to handle this
edge-case into the Horde libraries?

Thanks for reading,
-Julian
-- 
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: dev-unsubscribe@lists.horde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic