Add support for Mail-Followup-To to devel. In short, Reply To All will
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 25 Jul 2003 21:02:32 +0000 (21:02 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 25 Jul 2003 21:02:32 +0000 (21:02 +0000)
set To to the value of this header if set.
http://cr.yp.to/proto/replyto.html
http://www.ietf.org/proceedings/98dec/I-D/draft-ietf-drums-mail-followup-to-00.txt
I'm not a real DJB-enthousiast, but reportedly quite some software uses
this header; no harm in supporting it if it's present.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5421 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
class/mime/Rfc822Header.class.php
src/compose.php

index 337536d..721af7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,6 +64,7 @@ Version 1.5.0 -- CVS
     display preferences in stead of Default.
   - Updated 'action' to be 'smaction' so that plugins can modify the submit/action of
     forms.  This was suggested for the gpg plugin, but might be useful elsewhere.
+  - Add support for Mail-Followup-To header.
 
 **************************************
 *** SquirrelMail Stable Series 1.4 ***
index ca5ade5..9f495f2 100644 (file)
@@ -21,6 +21,7 @@ class Rfc822Header {
         $from = array(),
         $sender = '',
         $reply_to = array(),
+        $mail_followup_to = array(),
         $to = array(),
         $cc = array(),
         $bcc = array(),
@@ -125,6 +126,9 @@ class Rfc822Header {
             case 'reply-to':
                 $this->reply_to = $this->parseAddress($value, true);
                 break;
+            case 'mail-followup-to':
+                $this->mail_followup_to = $this->parseAddress($value, true);
+                break;
             case 'to':
                 $this->to = $this->parseAddress($value, true);
                 break;
index 5211cf6..451a5a5 100644 (file)
@@ -694,16 +694,23 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
             $body = '';
             break;
         case ('reply_all'):
-            $send_to_cc = replyAllString($orig_header);
-            $send_to_cc = decodeHeader($send_to_cc,false,true);
-        case ('reply'):
-            $send_to = $orig_header->reply_to;
-            if (is_array($send_to) && count($send_to)) {
-                $send_to = $orig_header->getAddr_s('reply_to');
-            } else if (is_object($send_to)) { /* unnessecarry, just for falesafe purpose */
-                $send_to = $orig_header->getAddr_s('reply_to');
+            if(isset($orig_header->mail_followup_to) && $orig_header->mail_followup_to) {
+                $send_to = $orig_header->getAddr_s('mail_followup_to');
             } else {
-                $send_to = $orig_header->getAddr_s('from');
+                $send_to_cc = replyAllString($orig_header);
+                $send_to_cc = decodeHeader($send_to_cc,false,true);
+            }
+        case ('reply'):
+            // skip this if send_to was already set right above here
+            if(!$send_to) {
+                $send_to = $orig_header->reply_to;
+                if (is_array($send_to) && count($send_to)) {
+                    $send_to = $orig_header->getAddr_s('reply_to');
+                } else if (is_object($send_to)) { /* unneccesarry, just for failsafe purpose */
+                    $send_to = $orig_header->getAddr_s('reply_to');
+                } else {
+                    $send_to = $orig_header->getAddr_s('from');
+                }
             }
             $send_to = decodeHeader($send_to,false,true);
             $subject = decodeHeader($orig_header->subject,false,true);