squirrelmail_usercopy multiple-email contact enhancement
|Reported by:||jcrawfordor||Owned by:|
Background: Squirrelmail allows you to store multiple email addresses with each contact via a comma-seperated list. When you select such a contact, all email addresses are added to the To: field. Multiple-address contacts in squirrelmail thus behave like mailing lists or groups. The squirrelmail_usercopy plugin as of 0.5.1 simply discards all but the first address for such contacts (not at all useful) and in development currently adds all email addresses to one Roundcube contact. The trouble is that Roundcube allows multiple email addresses per contact as a way to store multiple addresses for one person, not as a way to store multiple people as one address, if that makes sense. Squirrelmail's multiple-email functionality is better matched by Roundcube's contact groups, which allow you to easily email multiple people.
The attached patch modifies squirrelmail_usercopy so that, when it encounters a contact having multiple addresses, it creates a separate RC contact for each address, and then places all such contacts in to a group by the name of the squirrelmail contact.