summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Postman/Postman-Mail/Zend-1.12.10/Mail.php3
-rw-r--r--Postman/PostmanWpMail.php6
2 files changed, 6 insertions, 3 deletions
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
diff --git a/Postman/PostmanWpMail.php b/Postman/PostmanWpMail.php
index c108cce..7cd0596 100644
--- a/Postman/PostmanWpMail.php
+++ b/Postman/PostmanWpMail.php
@@ -65,8 +65,10 @@ if ( ! class_exists( 'PostmanWpMail' ) ) {
* @return PostmanMessage
*/
private function apply_default_headers( $message ) {
- $headers[] = 'Message-ID: ' . $this->createMessageId();
- $message->addHeaders($headers);
+ if(! $message->getMessageId()) {
+ $headers[] = 'Message-ID: ' . $this->createMessageId();
+ $message->addHeaders($headers);
+ }
}
/**