Changeset 268 for trunk

Show
Ignore:
Timestamp:
10/07/08 14:29:36 (3 months ago)
Author:
azza-bazoo
Message:

[composer] bugfix - set the In-Reply-To header for reply-to-all, and set References to the same as In-Reply-To

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/requests.inc.php

    r266 r268  
    699699        $mimeMessage->headers->set( 'User-Agent', 'Lichen ' . $LICHEN_VERSION ); 
    700700 
    701         // If this is a reply/forward of another message, get some details about that. 
    702         // Specifically, for generating an "In-Reply-To" header. 
    703         if ( isset( $_POST['comp_mode'] ) && ( $_POST['comp_mode'] == "reply" || substr( $_POST['comp_mode'], 0, 7 ) == "forward" ) ) { 
     701        // If this is a reply/forward of another message, get the headers of that message 
     702        // and set In-Reply-To: and References: 
     703        if ( isset( $_POST['comp_mode'] ) && 
     704                ( substr( $_POST['comp_mode'], 0, 5 ) == "reply" || 
     705                substr( $_POST['comp_mode'], 0, 7 ) == "forward" ) ) { 
     706 
    704707                $oldMailbox = $mailbox; 
    705708                changeMailbox( $_POST['comp_quotemailbox'] ); 
    706709                $replyData = imap_headerinfo( $mbox, imap_msgno( $mbox, $_POST['comp_quoteuid'] ) ); 
    707710                changeMailbox( $oldMailbox ); 
     711                 
     712                // TODO: for forwards, maybe don't set both headers. 
     713                // Gmail sets both, Apple Mail sets only References, Thunderbird sets neither 
    708714                $mimeMessage->headers->set( 'In-Reply-To', $replyData->message_id ); 
     715                $mimeMessage->headers->set( 'References', $replyData->message_id ); 
    709716        } 
    710717