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:
phpnut 2008-06-09 23:35:38 +00:00
parent ebe4b5824f
commit cbebf3e6b3

View file

@ -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;