[imp] Add to Addressbook

dimon at intellinetinc.com dimon at intellinetinc.com
Thu Apr 24 14:37:41 PDT 2003


> 
> Problem:
> I had a problem with "Add to Addressbook" which consisted of the
> RFC-formatted naming of the e-mail address info being imported into the
> addressbook instead of the bare e-mail address as I suspect is the desired
> behavior.  I tried putting a few regexps in to strip out the offending
> characters and it seems to work pretty well.

I had the same problem, and the solution is here:
in CHANGELOG from HORDE 3.0 cvs
[jan] Add MIME::rfc822WriteAddress() to replace imap_rfc822_write_address().

But in /imp/lib/Headers.php in function getFromAddress it wasn't really changed 
for some reason

So I just changed
return trim(MIME::trimEmailAddress(imap_rfc822_write_address($ob[0]->mailbox, 
$ob[0]->host, '')));
to
return trim(MIME::trimEmailAddress(MIME::rfc822WriteAddress($ob[0]->mailbox, $ob
[0]->host, '')));

And it worked

Good luck,
Dmitry


More information about the imp mailing list