From 14e4700127a5b2dee88ae7324bc90a7c6db011a9 Mon Sep 17 00:00:00 2001 From: cos Date: Tue, 20 Oct 2020 11:08:47 +0200 Subject: Fix bug overwriting message-id In case a message-id is already set, postman should not touch it. This commit also checks for existing brackets before adding them, due to inconsistence in function usage. --- Postman/Postman-Mail/Zend-1.12.10/Mail.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Postman/Postman-Mail/Zend-1.12.10/Mail.php') diff --git a/Postman/Postman-Mail/Zend-1.12.10/Mail.php b/Postman/Postman-Mail/Zend-1.12.10/Mail.php index 702add0..0b68e9a 100644 --- a/Postman/Postman-Mail/Zend-1.12.10/Mail.php +++ b/Postman/Postman-Mail/Zend-1.12.10/Mail.php @@ -1064,7 +1064,8 @@ class Postman_Zend_Mail extends Postman_Zend_Mime_Message if ($this->_messageId === null) { $id = $this->_filterOther($id); $this->_messageId = $id; - $this->_storeHeader('Message-Id', '<' . $this->_messageId . '>'); + $this->_storeHeader('Message-Id', ($this->_messageId[0] == '<'?'':'<') . $this->_messageId . '>' . + ($this->_messageId[-1] == '>'?'':'>')); } else { /** * @see Postman_Zend_Mail_Exception -- cgit v1.2.3