The MIME version can be used in all types of e-mail. Fixes #14.

This commit is contained in:
Juan Basso 2011-04-19 21:47:48 -04:00
parent 1fee549063
commit be4b9fcd02
2 changed files with 5 additions and 1 deletions

View file

@ -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';

View file

@ -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'
);