From 763b428fcf6d8c4b4afca101903606362cad0a86 Mon Sep 17 00:00:00 2001 From: Mike Ho Date: Sat, 31 Jul 2010 01:07:31 -0700 Subject: [PATCH] Fix on quoted printable encoding on email subject line --- includes/qcodo/_core/framework/QEmailServer.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/qcodo/_core/framework/QEmailServer.class.php b/includes/qcodo/_core/framework/QEmailServer.class.php index 6720813e..37cb43b7 100644 --- a/includes/qcodo/_core/framework/QEmailServer.class.php +++ b/includes/qcodo/_core/framework/QEmailServer.class.php @@ -569,7 +569,11 @@ public function CalculateMessageHeaderAndBody($strEncodingType = null, QDateTime if (!$strEncodingType) $strEncodingType = QApplication::$EncodingType; // Additional "Optional" Headers - if ($this->Subject) $this->SetHeader('Subject', sprintf("=?%s?Q?%s?=", $strEncodingType, self::QuotedPrintableEncode($this->Subject))); + if ($this->Subject) { + $strSubject = self::QuotedPrintableEncode($this->Subject); + $strSubject = str_replace('?', '=3F', $strSubject); + $this->SetHeader('Subject', sprintf("=?%s?Q?%s?=", $strEncodingType, $strSubject)); + } if ($this->Cc) $this->SetHeader('Cc', $this->Cc); // Setup for MIME and Content Encoding