diff --git a/lib/Cake/Network/CakeEmail.php b/lib/Cake/Network/CakeEmail.php index 53b841e08..cb4345599 100644 --- a/lib/Cake/Network/CakeEmail.php +++ b/lib/Cake/Network/CakeEmail.php @@ -630,8 +630,8 @@ class CakeEmail { $headers['Subject'] = $this->_subject; } + $headers['MIME-Version'] = '1.0'; if (!empty($this->_attachments)) { - $headers['MIME-Version'] = '1.0'; $headers['Content-Type'] = 'multipart/mixed; boundary="' . $this->_boundary . '"'; $headers[] = 'This part of the E-mail should never be seen. If'; $headers[] = 'you are reading this, consider upgrading your e-mail'; diff --git a/lib/Cake/tests/Case/Network/CakeEmailTest.php b/lib/Cake/tests/Case/Network/CakeEmailTest.php index 2750dc0de..cf79792ba 100644 --- a/lib/Cake/tests/Case/Network/CakeEmailTest.php +++ b/lib/Cake/tests/Case/Network/CakeEmailTest.php @@ -392,6 +392,7 @@ class CakeEmailTest extends CakeTestCase { 'X-Something' => 'nice', 'X-Mailer' => 'CakePHP Email Component', 'Date' => date(DATE_RFC2822), + 'MIME-Version' => '1.0', 'Content-Type' => 'text/plain; charset=UTF-8', 'Content-Transfer-Encoding' => '7bit' ); @@ -403,6 +404,7 @@ class CakeEmailTest extends CakeTestCase { 'X-Other' => 'cool', 'X-Mailer' => 'CakePHP Email Component', 'Date' => date(DATE_RFC2822), + 'MIME-Version' => '1.0', 'Content-Type' => 'text/plain; charset=UTF-8', 'Content-Transfer-Encoding' => '7bit' ); @@ -417,6 +419,7 @@ class CakeEmailTest extends CakeTestCase { 'X-Other' => 'cool', 'X-Mailer' => 'CakePHP Email Component', 'Date' => date(DATE_RFC2822), + 'MIME-Version' => '1.0', 'Content-Type' => 'text/plain; charset=UTF-8', 'Content-Transfer-Encoding' => '7bit' ); @@ -434,6 +437,7 @@ class CakeEmailTest extends CakeTestCase { 'X-Other' => 'cool', 'X-Mailer' => 'CakePHP Email Component', 'Date' => date(DATE_RFC2822), + 'MIME-Version' => '1.0', 'Content-Type' => 'text/plain; charset=UTF-8', 'Content-Transfer-Encoding' => '7bit' );