Summary | MIME::encodeAddress() (implicitly) enforce RFC822 format checking before RFC2047 encoding |
Queue | Horde Framework Packages |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | Horde Developers (at) , slusarz (at) horde (dot) org |
Requester | rafan (at) csie (dot) org |
Created | 02/10/2005 (7458 days ago) |
Due | |
Updated | 06/14/2005 (7334 days ago) |
Assigned | 04/22/2005 (7387 days ago) |
Resolved | 06/14/2005 (7334 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
Bug 2086.New Attachment: imp_problem.jpg
If I choose an address from the public addressbook, some of them miss
the last character '>'. Allways the same address. It's different in
firefox (worst), opera and IE.
In attachment you can see the picture (1. firefox, 2. IE, 3. opera)
Thanks a lot
destroying BC.
State ⇒
Priority ⇒ 1. Low
Mail_RFC822 much cleaner in MIME::encodeAddress(). Namely, we should
return a PEAR_Error from encodeAddress() if an error is encountered.
MIME::encodeAddress() is used all over the place, though, so there's
quite a bit of code to patch. Additionally, this might break BC
since, when before MIME::encodeAddress() was returning an empty
string, now it will be returning a PEAR_Error. I think I need to
think about this a bit more.
Suppose I have a contact named ``foo <bar> <email>'' where bar is not his/her
email, but part of the name. This fails in Mail_RFC822::parseAddressList()
because <bar> is parsed as email, where <email> is the real one.
I think it is not easy to fix all situations since email list can be
from hand typing
or selecting from contact. But letter case can be solved by store a
real name/email
in somewhere and display them (IIRC, there is some discussion in the mailing).
At least, MIME::encodeAddress() SHOULD handle parsing error when calling
RFC822::parseAddressList() instead of do nothing. In this way, user
will assume
their mail sent out, but in fact not. IMP's compose.php should also
handle this.
State ⇒ Not A Bug
validation should be performed or not. When false, as in MIME.php,
validation is not performed in parseAddressList(). So multibyte
characters should technically be OK. If they are not being ignored
correctly, this is a bug in Mail_RFC822, not Horde's MIME.
Assigned to
State ⇒ Assigned
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ MIME::encodeAddress() (implicitly) enforce RFC822 format checking before RFC2047 encoding
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
calls MIME::encodeAddress() which has the following code segment:
require_once 'Mail/RFC822.php';
$parser = &new Mail_RFC822();
$addr_arr = $parser->parseAddressList($text, $defserver,
false, false);
The code segment above is BEFORE it does RFC2047 encoding.
The problem is Mail_RFC822's parseAddressList() will enforce
strict RFC822 format checking. For some multibyte characters, like Big5,
there is \ or ' in chatacter. So, these characters can not fulfill
RFC822 format.
This has been discussed in imp mailing (2004 Aug to Oct) with the
thread: " [imp] address book -> compose window ".
Yes, it's a long time ago, but I was too busy that time, so here is the
ticket.
By the way, I just found that long time ago there already a _rfc822explode
like function called 'rfc822Explode()' in MIME.php (imported in rev 1.78, 2
years ago). So, I think this is a point that we can start from.