#2617 multi-emails made "Bad Address Syntax"

closed-fixed
nobody
5
2009-02-19
2009-02-18
No

My users put their friends in to address book.
She put single Nickname with many email addresses.
When adding, it work fine.
But once Compose then use Address in Address book, it put like (In the To: textbox)
Nickname <email1@yahoo.com,email2@hotmail.com,email3@gmail.com>

and when click on Send button, got ...

Message not sent. Server replied:
Syntax error in parameters or arguments
501 Bad address syntax

Then: (What I hack the code...)
in functions/addressbook.php

function full_address($row)

/* I Modified by comment this
if ($addrsrch_fullname == 'fullname')
return $row['name'] . ' <' . trim($row['email']) . '>';
else if ($addrsrch_fullname == 'nickname')
return $row['nickname'] . ' <' . trim($row['email']) . '>';
else // "noprefix"
*/
return trim($row['email']);

Then, it worked.
Is it ok?

Discussion

  • No, it's not OK to simply comment out a whole block of code that you don't know what it does. Additionally, address book entries are for single entities (e.g., one person), NOT for groups. If you want to provide address grouping functionalities for your users, install a plugin such as Address Book Grouping and Pagination (http://squirrelmail.org/plugin_view.php?id=267). However, I have just committed an "enhancement" to the core that knows how to split addresses that have one or more commas in them. The use of this feature is highly discouraged, but if you want to apply it to your installation, find the patch (assuming you are using 1.4.x, which you did not specify (please ALWAYS specify such things)) here: http://squirrelmail.svn.sourceforge.net/viewvc/squirrelmail/branches/SM-1_4-STABLE/squirrelmail/functions/addressbook.php?view=patch&r1=13406&r2=13405&pathrev=13406

     
    • status: open --> closed-fixed