Ignore Reply-List address if it is the same as To/Reply-To
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 15 Mar 2010 19:51:17 +0000 (13:51 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 15 Mar 2010 21:40:37 +0000 (15:40 -0600)
imp/lib/Compose.php

index 28af5ff..d11504a 100644 (file)
@@ -1349,12 +1349,16 @@ class IMP_Compose
         }
 
         if (!is_null($list_info) && !empty($list_info['reply_list'])) {
-            $header['to'] = $list_info['reply_list'];
+            /* If To/Reply-To and List-Reply address are the same, no need
+             * to handle these address separately. */
+            if (Horde_Mime_Address::bareAddress($list_info['reply_list']) != Horde_Mime_Address::bareAddress($header['to'])) {
+                $header['to'] = $list_info['reply_list'];
+                $reply_type = 'reply_list';
+            }
+
             if ($type == '*') {
                 $all_headers['reply_list'] = $header;
             }
-
-            $reply_type = 'reply_list';
         } elseif (in_array($type, array('reply_all', 'reply_auto', '*'))) {
             /* Clear the To field if we are auto-determining addresses. */
             if ($type == 'reply_auto') {