mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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
This commit is contained in:
parent
9af317b1b4
commit
5f967487bb
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue