diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index 2fae6928e..63615aff6 100755 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -613,9 +613,6 @@ class EmailComponent extends Object{ $this->_createBoundary(); $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'; - $headers[] = 'client to a MIME-compatible client.'; } elseif ($this->sendAs === 'text') { $headers['Content-Type'] = 'text/plain; charset=' . $this->charset; } elseif ($this->sendAs === 'html') { @@ -781,7 +778,7 @@ class EmailComponent extends Object{ } if ($hasAlias && !empty($matches[2])) { - return $this->_encode($matches[2]) . $this->_strip(' <' . $matches[3] . '>'); + return $this->_encode(trim($matches[2])) . $this->_strip(' <' . $matches[3] . '>'); } return $this->_strip($string); } diff --git a/cake/tests/cases/libs/controller/components/email.test.php b/cake/tests/cases/libs/controller/components/email.test.php index f97be8ec0..29998ab2c 100755 --- a/cake/tests/cases/libs/controller/components/email.test.php +++ b/cake/tests/cases/libs/controller/components/email.test.php @@ -1299,7 +1299,7 @@ HTMLBLOC; function testFormatAddressMultibyte() { $this->Controller->EmailTest->charset = 'UTF-8'; $result = $this->Controller->EmailTest->formatAddress('ÄÖÜTest <email@domain.de>'); - $this->assertEqual($result, '=?UTF-8?B?w4TDlsOcVGVzdCA=?= <email@domain.de>'); + $this->assertEqual($result, '=?UTF-8?B?w4TDlsOcVGVzdA==?= <email@domain.de>'); $result = $this->Controller->EmailTest->formatAddress('ÄÖÜTest<email@domain.de>'); $this->assertEqual($result, '=?UTF-8?B?w4TDlsOcVGVzdA==?= <email@domain.de>');