Aleksander Machniak
2015-09-06 175ca6fd65ed08b6011e8b66288acb039d3c68cd
Fix so In-Reply-To header is set also for MDN receipts (#1490523)
2 files modified
17 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 16 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -11,6 +11,7 @@
- Fix so gc.sh script removes also expired sessions from sql database (#1490512)
- Fix support for Mozilla-based browsers, e.g. Pale Moon (#1490517)
- Fix various issues with Turkish (and similar) locales (#1490519)
- Fix so In-Reply-To header is set also for MDN receipts (#1490523)
RELEASE 1.0.6
-------------
program/steps/mail/func.inc
@@ -1798,6 +1798,7 @@
            'Message-ID' => $RCMAIL->gen_message_id(),
            'X-Sender'   => $identity['email'],
            'References' => trim($message->headers->references . ' ' . $message->headers->messageID),
            'In-Reply-To' => $message->headers->messageID,
        );
        $report = "Final-Recipient: rfc822; {$identity['email']}\r\n"
@@ -1813,20 +1814,21 @@
            $report .= "Reporting-UA: $agent\r\n";
        }
        $to   = rcube_mime::decode_mime_string($message->headers->to, $message->headers->charset);
        $date = $RCMAIL->format_date($message->headers->date, $RCMAIL->config->get('date_long'));
        $body = $RCMAIL->gettext("yourmessage") . "\r\n\r\n" .
            "\t" . $RCMAIL->gettext("to") . ': ' . rcube_mime::decode_mime_string($message->headers->to, $message->headers->charset) . "\r\n" .
            "\t" . $RCMAIL->gettext("subject") . ': ' . $message->subject . "\r\n" .
            "\t" . $RCMAIL->gettext("date") . ': ' . $RCMAIL->format_date($message->headers->date, $RCMAIL->config->get('date_long')) . "\r\n" .
            "\t" . $RCMAIL->gettext("to") . ": {$to}\r\n" .
            "\t" . $RCMAIL->gettext("subject") . ": {$message->subject}\r\n" .
            "\t" . $RCMAIL->gettext("date") . ": {$date}\r\n" .
            "\r\n" . $RCMAIL->gettext("receiptnote");
        $compose->headers($headers);
        $compose->headers(array_filter($headers));
        $compose->setContentType('multipart/report', array('report-type'=> 'disposition-notification'));
        $compose->setTXTBody(rcube_mime::wordwrap($body, 75, "\r\n"));
        $compose->addAttachment($report, 'message/disposition-notification', 'MDNPart2.txt', false, '7bit', 'inline');
        if ($RCMAIL->config->get('mdn_use_from')) {
            $options['mdn_use_from'] = true;
        }
        // SMTP options
        $options = array('mdn_use_from' => (bool) $RCMAIL->config->get('mdn_use_from'));
        $sent = $RCMAIL->deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file, $options);