Prefer Reply All when determining auto reply mechanism
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 30 Nov 2009 18:26:50 +0000 (11:26 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 30 Nov 2009 18:27:42 +0000 (11:27 -0700)
imp/lib/Compose.php

index 897b1d5..e3d143d 100644 (file)
@@ -1298,7 +1298,7 @@ class IMP_Compose
             }
         }
 
-        if (in_array($type, array('reply_all', '*'))) {
+        if (in_array($type, array('reply_all', 'reply_auto', '*'))) {
             /* Filter out our own address from the addresses we reply to. */
             $identity = Horde_Prefs_Identity::singleton(array('imp', 'imp'));
             $all_addrs = array_keys($identity->getAllFromAddresses(true));
@@ -1340,6 +1340,12 @@ class IMP_Compose
                     $hdr_cc[] = $ob['address'] . ', ';
                 }
             }
+
+            /* Clear the To field if we are auto-determining list. */
+            if ($type == 'reply_auto') {
+                $header['to'] = '';
+            }
+
             $header[empty($header['to']) ? 'to' : 'cc'] = rtrim(implode('', $hdr_cc), ' ,');
 
             /* Build the Bcc: header. */