fixes #6397, removing unneeded line feed in email component headers, adding tests

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8248 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
DarkAngelBGE 2009-07-22 16:04:53 +00:00
parent 07096f3bcc
commit 3e14d281df
2 changed files with 29 additions and 4 deletions

View file

@ -491,7 +491,6 @@ class EmailComponent extends Object{
$this->__header[] = 'Content-Type: text/html; charset=' . $this->charset;
} elseif ($this->sendAs === 'both') {
$this->__header[] = 'Content-Type: multipart/alternative; boundary="alt-' . $this->__boundary . '"';
$this->__header[] = '';
}
$this->__header[] = 'Content-Transfer-Encoding: 7bit';
@ -504,7 +503,7 @@ class EmailComponent extends Object{
*/
function __formatMessage($message) {
if (!empty($this->attachments)) {
$prefix[] = '--' . $this->__boundary;
$prefix = array('--' . $this->__boundary);
if ($this->sendAs === 'text') {
$prefix[] = 'Content-Type: text/plain; charset=' . $this->charset;
} elseif ($this->sendAs === 'html') {