From 366cbc8f9caad0b8bc9ba6065fb9549aee1744d3 Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Tue, 30 Aug 2011 15:31:18 +0300 Subject: [PATCH] Don't quote the charset in content-type headers. While RFC2045 section 5.1 says it should work with or without, it seems that some clients don't like it quoted. --- class.phpmailer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class.phpmailer.php b/class.phpmailer.php index 4589cd79..f813712d 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -1223,7 +1223,7 @@ class PHPMailer { switch($this->message_type) { case 'plain': $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); - $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset="'.$this->CharSet.'"'); + $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet); break; case 'inline': $result .= $this->HeaderLine('Content-Type', 'multipart/related;'); @@ -1398,7 +1398,7 @@ class PHPMailer { $encoding = $this->Encoding; } $result .= $this->TextLine('--' . $boundary); - $result .= sprintf("Content-Type: %s; charset=\"%s\"", $contentType, $charSet); + $result .= sprintf("Content-Type: %s; charset=%s", $contentType, $charSet); $result .= $this->LE; $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding); $result .= $this->LE;