[Tickets #6732] Re: Sending mail to contact lists doesn't work

bugs at horde.org bugs at horde.org
Thu May 22 16:27:39 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6732
-----------------------------------------------------------------------
 Ticket             | 6732
 Updated By         | janne.peltonen at helsinki.fi
 Summary            | Sending mail to contact lists doesn't work
 Queue              | IMP
 Version            | 4.2-RC4
 Type               | Bug
 State              | Feedback
 Priority           | 2. Medium
 Milestone          |
 Patch              |
 Owners             |
-----------------------------------------------------------------------


janne.peltonen at helsinki.fi (2008-05-22 12:27) wrote:

...to be more exact, the real problem appeared to be that in Compose.php
method recipientList it is assumed that the IMP::parseAddressList($email)
in line 1149 (or thereabouts) would return the recipient addresses in flat
format (that is, it would return an array of objects which would each have
the properties mailbox and host, as assumed in line 1155 and later on).
However, my apache error_log ended up with error messages such as "PHP
Notice:  Undefined property:  stdClass::$mailbox in
/var/www/html/horde/imp/lib/Compose.php on line 1155". This would mean that
for each contact list, we'd end up with addresses with an empty mailbox
part and the default domain as the host part. And the reason appeared to be
that the IMP::parseAddressList would return contact list type addresses in
the nested form, that is, the returned objects in the array would have
properties such as groupname and addresses, the latter of which would
contain an array of the kind of objects that the recipientList method was
expecting. Looking at IMP.php line 435 in method parseAddressList, you can
see that $parser->parseAddressList was called with null as the third
argument. Now, the third argument should be a boolean telling whether we
want the group (contact list) addresses in flat format or in the nested
format. And null is not a false value in php. When I changed that null to
false (as in the patch I submitted previously), parser->parseAddressList
started giving contact list parses in the flat format, and everything
started to work.




More information about the bugs mailing list