summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-03-11 22:44:43 +0000
committerthomascube <thomas@roundcube.net>2010-03-11 22:44:43 +0000
commitbc404ffd41c3411510a022ae5b0c9f2bfe8f5db1 (patch)
treefb93534c5381332d04efe19e1d7f6f31b7558113 /program/steps/mail/sendmail.inc
parent56505a11743d6869f6222f6b9467158edf295a44 (diff)
Save draft information in one header; finally fixes #1486203
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r--program/steps/mail/sendmail.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index acff62d79..13210be68 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -313,12 +313,12 @@ else if (!empty($identity_arr['reply-to']))
if (!empty($_SESSION['compose']['reply_msgid']))
$headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid'];
-
+
// remember reply/forward UIDs in special headers
if (!empty($_SESSION['compose']['reply_uid']) && $savedraft)
- $headers['X-Reply-UID'] = $_SESSION['compose']['reply_uid'];
+ $headers['X-Draft-Info'] = array('type' => 'reply', 'uid' => $_SESSION['compose']['reply_uid']);
else if (!empty($_SESSION['compose']['forward_uid']) && $savedraft)
- $headers['X-Forward-UID'] = $_SESSION['compose']['forward_uid'];
+ $headers['X-Draft-Info'] = array('type' => 'forward', 'uid' => $_SESSION['compose']['forward_uid']);
if (!empty($_SESSION['compose']['references']))
$headers['References'] = $_SESSION['compose']['references'];
@@ -341,6 +341,9 @@ if (!empty($_POST['_receipt']))
$headers['Message-ID'] = $message_id;
$headers['X-Sender'] = $from;
+if (is_array($headers['X-Draft-Info']))
+ $headers['X-Draft-Info'] = rcmail_draftinfo_encode($headers['X-Draft-Info'] + array('folder' => $_SESSION['compose']['mailbox']));
+
if (!empty($CONFIG['useragent']))
$headers['User-Agent'] = $CONFIG['useragent'];