瀏覽代碼

When message being replied to has no Reply-To header, we use the From header to fill in the reply To address, so we have to account for that situation when building the Cc header

pdontthink 6 年之前
父節點
當前提交
ef9fbfbd8f
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/compose.php

+ 5 - 1
src/compose.php

@@ -175,8 +175,12 @@ function replyAllString($header) {
     /**
      * 1) Remove the addresses we'll be sending the message 'to'
      */
-    if (isset($header->reply_to)) {
+    if (isset($header->reply_to) && is_array($header->reply_to) && count($header->reply_to)) {
         $excl_ar = $header->getAddr_a('reply_to');
+    } else if (is_object($header->reply_to)) { /* unneccesarry, just for failsafe purpose */
+        $excl_ar = $header->getAddr_a('reply_to');
+    } else {
+        $excl_ar = $header->getAddr_a('from');
     }
     /**
      * 2) Remove our identities from the CC list (they still can be in the