From d3f64c34f2840ff11597b1d36ff1dc435d945631 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 12 May 2021 05:33:01 +0000 Subject: [PATCH] Make sure drafts are sent with the current date and not that of its previous 'Save Draft' action git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14922 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compose.php b/src/compose.php index 03993ce7..1c04a023 100644 --- a/src/compose.php +++ b/src/compose.php @@ -1729,6 +1729,11 @@ function deliverMessage(&$composeMessage, $draft=false) { $rfc822_header = $composeMessage->rfc822_header; + // clear Date header so drafts don't end up with a stale date + // (does this cause issues with some other scenario where a + // message with an existing date header should be preserved??) + unset($rfc822_header->date); + $abook = addressbook_init(false, true); $rfc822_header->to = $rfc822_header->parseAddress($send_to,true, array(), '', $domain, array(&$abook,'lookup')); $rfc822_header->cc = $rfc822_header->parseAddress($send_to_cc,true,array(), '',$domain, array(&$abook,'lookup')); -- 2.25.1