mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Minor optimization for email linefeeds.
This commit is contained in:
parent
9402f0ab79
commit
f3812342c2
1 changed files with 4 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue