caedes avatar caedes committed 02fd6b5

make list-id conformant to rfc 2919

Comments (0)

Files changed (1)


         $group_name = strtolower($group_name);
 	return $group_name;
-function groupmailshot_get_groupmail($group, $mailname) {
+function groupmailshot_get_groupmail($group, $mailname, $separator="@") {
 	$group_name = groupmailshot_filtername($group->name);
-        $group_email = $group_name."@".$mailname;
+        $group_email = $group_name.$separator.$mailname;
 	$parent = get_entity($group->container_guid);
 	if ($parent instanceof ElggGroup)
 		$group_email = groupmailshot_filtername($parent->name)."+".$group_email;
   $from_email = $from->email;
   $group_email = groupmailshot_get_groupmail($group, $mailname);
+  $group_listid = groupmailshot_get_groupmail($group, $mailname, ".");
   if (check_entity_relationship($from->getGUID(), 'obfuscated_groupmailshot', $group->getGUID()) || !$from_email) {
     $from_email = $from->username . '';
 		. "Content-Type: text/plain; charset=UTF-8; format=flowed{$header_eol}"
   		. "MIME-Version: 1.0{$header_eol}"
   		. "Reply-To: <{$group_email}>{$header_eol}"
-  		. "List-Id: <{$group_email}>{$header_eol}"
+  		. "List-Id: <{$group_listid}>{$header_eol}"
   		. "List-Post: <mailto:{$group_email}>{$header_eol}"
                 . "Precedence: list{$header_eol}"
                 . "Message-Id: <{$msg_id}>{$header_eol}"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.