issues@javamail.java.net

[Bug 5257] parse() method removes quotes around personal name when parsing in InternetAddress

From: <bugzilla-daemon_at_kenai.com>
Date: Tue, 17 Jul 2012 19:25:48 +0000

http://kenai.com/bugzilla/show_bug.cgi?id=5257

Bill Shannon <shannon_at_kenai.com> changed:

           What |Removed |Added
----------------------------------------------------------------------------
             Status|NEW |ASSIGNED

--- Comment #1 from Bill Shannon <shannon_at_kenai.com> 2012-07-17 19:25:48 UTC ---
Quotes in the private name field shouldn't be considered part of the value
of the field, but rather just the syntax the header format requires in order
to preserve the value of the field. JavaMail will quote the personal name
value when needed, and remove the quotes when parsing the header.

If you're dealing with broken software that *requires* the quotes even when
they're not necessary, I'm not sure I see any really good options.
Certainly one approach is to set the address header using the setHeader method
so you can format the header however you want.

I could add an option to always quote the personal name field but it would
have to be a System property since InternetAddress doesn't have access to
the Session. Would that be sufficient?

-- 
Configure bugmail: http://kenai.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.