Minor optimization for email linefeeds.

This commit is contained in:
Phally 2011-01-31 00:15:12 +01:00
parent 9402f0ab79
commit f3812342c2

View file

@ -159,7 +159,7 @@ class EmailComponent extends Object{
/**
* Line feed character(s) to be used when sending using mail() function
* If null PHP_EOL is used.
* By default PHP_EOL is used.
* RFC2822 requires it to be CRLF but some Unix
* mail transfer agents replace LF by CRLF automatically
* (which leads to doubling CR if CRLF is used).
@ -167,7 +167,7 @@ class EmailComponent extends Object{
* @var string
* @access public
*/
var $lineFeed = null;
var $lineFeed = PHP_EOL;
/**
* @deprecated see lineLength
@ -819,13 +819,8 @@ class EmailComponent extends Object{
* @access private
*/
function _mail() {
if ($this->lineFeed === null) {
$lineFeed = PHP_EOL;
} else {
$lineFeed = $this->lineFeed;
}
$header = implode($lineFeed, $this->__header);
$message = implode($lineFeed, $this->__message);
$header = implode($this->lineFeed, $this->__header);
$message = implode($this->lineFeed, $this->__message);
if (is_array($this->to)) {
$to = implode(', ', array_map(array($this, '_formatAddress'), $this->to));
} else {