mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for new line endings when sending email via php mail();
Fixed typo __headers should have been __header git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7149 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ebe4b5824f
commit
cbebf3e6b3
1 changed files with 5 additions and 5 deletions
|
@ -242,7 +242,7 @@ class EmailComponent extends Object{
|
|||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
var $_newLine = "\r\n";
|
||||
var $_newLine = "\n";
|
||||
/**
|
||||
* Enter description here...
|
||||
*
|
||||
|
@ -330,11 +330,10 @@ class EmailComponent extends Object{
|
|||
if ($this->_debug) {
|
||||
return $this->__debug();
|
||||
}
|
||||
|
||||
$__method = '__'.$this->delivery;
|
||||
$sent = $this->$__method();
|
||||
|
||||
$this->__headers = '';
|
||||
$this->__header = '';
|
||||
$this->__message = '';
|
||||
|
||||
return $sent;
|
||||
|
@ -438,6 +437,7 @@ class EmailComponent extends Object{
|
|||
*/
|
||||
function __createHeader() {
|
||||
if ($this->delivery == 'smtp') {
|
||||
$this->_newLine = "\r\n";
|
||||
$this->__header = 'To: ' . $this->__formatAddress($this->to) . $this->_newLine;
|
||||
}
|
||||
$this->__header .= 'From: ' . $this->__formatAddress($this->from) . $this->_newLine;
|
||||
|
|
Loading…
Reference in a new issue