mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
"Fixes #3634, Email Component and PHP4. Double headers being set for To: and Subject:"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6047 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
eba8f6770b
commit
d4a0f8300e
1 changed files with 6 additions and 2 deletions
|
@ -424,7 +424,9 @@ class EmailComponent extends Object{
|
|||
* @access private
|
||||
*/
|
||||
function __createHeader() {
|
||||
$this->__header = 'To: ' . $this->__formatAddress($this->to) . $this->_newLine;
|
||||
if ($this->delivery == 'smtp') {
|
||||
$this->__header = 'To: ' . $this->__formatAddress($this->to) . $this->_newLine;
|
||||
}
|
||||
$this->__header .= 'From: ' . $this->__formatAddress($this->from) . $this->_newLine;
|
||||
|
||||
if (!empty($this->replyTo)) {
|
||||
|
@ -452,7 +454,9 @@ class EmailComponent extends Object{
|
|||
}
|
||||
$this->__header .= 'Bcc: ' . substr($addresses, 2) . $this->_newLine;
|
||||
}
|
||||
$this->__header .= 'Subject: ' . $this->subject . $this->_newLine;
|
||||
if ($this->delivery == 'smtp') {
|
||||
$this->__header .= 'Subject: ' . $this->subject . $this->_newLine;
|
||||
}
|
||||
$this->__header .= 'X-Mailer: ' . $this->xMailer . $this->_newLine;
|
||||
|
||||
if (!empty($this->headers)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue