From 5f967487bb3fb60f670af991313badb267a198b0 Mon Sep 17 00:00:00 2001 From: "mariano.iglesias" Date: Thu, 17 Apr 2008 22:12:58 +0000 Subject: [PATCH] Encoding subject without modifying original, fixes #4489 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6683 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/components/email.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index 7f44cb1cc..27bf25582 100644 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -288,7 +288,6 @@ class EmailComponent extends Object{ * @access public */ function send($content = null, $template = null, $layout = null) { - $this->subject = $this->__encode($this->subject); $this->__createHeader(); if ($template) { @@ -458,7 +457,7 @@ class EmailComponent extends Object{ $this->__header .= 'Bcc: ' . substr($addresses, 2) . $this->_newLine; } if ($this->delivery == 'smtp') { - $this->__header .= 'Subject: ' . $this->subject . $this->_newLine; + $this->__header .= 'Subject: ' . $this->__encode($this->subject) . $this->_newLine; } $this->__header .= 'X-Mailer: ' . $this->xMailer . $this->_newLine; @@ -638,9 +637,9 @@ class EmailComponent extends Object{ */ function __mail() { if (ini_get('safe_mode')) { - return @mail($this->to, $this->subject, $this->__message, $this->__header); + return @mail($this->to, $this->__encode($this->subject), $this->__message, $this->__header); } - return @mail($this->to, $this->subject, $this->__message, $this->__header, $this->additionalParams); + return @mail($this->to, $this->__encode($this->subject), $this->__message, $this->__header, $this->additionalParams); } /** * Sends out email via SMTP