mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Renamed the default X-Mailer value.
This commit is contained in:
parent
636b48024d
commit
6a7b42f1eb
3 changed files with 7 additions and 9 deletions
|
@ -333,7 +333,7 @@ class EmailComponent extends Component {
|
|||
|
||||
$lib->subject($this->subject)->messageID($this->messageId);
|
||||
|
||||
$headers = array();
|
||||
$headers = array('X-Mailer' => $this->xMailer);
|
||||
foreach ($this->headers as $key => $value) {
|
||||
$headers['X-' . $key] = $value;
|
||||
}
|
||||
|
|
|
@ -32,11 +32,11 @@ App::uses('View', 'View');
|
|||
*/
|
||||
class CakeEmail {
|
||||
/**
|
||||
* What mailer should EmailComponent identify itself as
|
||||
* Default X-Mailer
|
||||
*
|
||||
* @constant EMAIL_CLIENT
|
||||
*/
|
||||
const EMAIL_CLIENT = 'CakePHP Email Component';
|
||||
const EMAIL_CLIENT = 'CakePHP Email';
|
||||
|
||||
/**
|
||||
* Line length - no should more - RFC 2822 - 2.1.1
|
||||
|
@ -943,9 +943,7 @@ class CakeEmail {
|
|||
|
||||
if (!empty($this->_attachments)) {
|
||||
$this->_attachFiles();
|
||||
}
|
||||
|
||||
if (!empty($this->_attachments)) {
|
||||
$this->_message[] = '';
|
||||
$this->_message[] = '--' . $this->_boundary . '--';
|
||||
$this->_message[] = '';
|
||||
|
|
|
@ -390,7 +390,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$this->CakeEmail->setHeaders(array('X-Something' => 'nice'));
|
||||
$expected = array(
|
||||
'X-Something' => 'nice',
|
||||
'X-Mailer' => 'CakePHP Email Component',
|
||||
'X-Mailer' => 'CakePHP Email',
|
||||
'Date' => date(DATE_RFC2822),
|
||||
'MIME-Version' => '1.0',
|
||||
'Content-Type' => 'text/plain; charset=UTF-8',
|
||||
|
@ -402,7 +402,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$expected = array(
|
||||
'X-Something' => 'very nice',
|
||||
'X-Other' => 'cool',
|
||||
'X-Mailer' => 'CakePHP Email Component',
|
||||
'X-Mailer' => 'CakePHP Email',
|
||||
'Date' => date(DATE_RFC2822),
|
||||
'MIME-Version' => '1.0',
|
||||
'Content-Type' => 'text/plain; charset=UTF-8',
|
||||
|
@ -417,7 +417,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
'From' => 'cake@cakephp.org',
|
||||
'X-Something' => 'very nice',
|
||||
'X-Other' => 'cool',
|
||||
'X-Mailer' => 'CakePHP Email Component',
|
||||
'X-Mailer' => 'CakePHP Email',
|
||||
'Date' => date(DATE_RFC2822),
|
||||
'MIME-Version' => '1.0',
|
||||
'Content-Type' => 'text/plain; charset=UTF-8',
|
||||
|
@ -435,7 +435,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
'To' => 'cake@cakephp.org, CakePHP <php@cakephp.org>',
|
||||
'X-Something' => 'very nice',
|
||||
'X-Other' => 'cool',
|
||||
'X-Mailer' => 'CakePHP Email Component',
|
||||
'X-Mailer' => 'CakePHP Email',
|
||||
'Date' => date(DATE_RFC2822),
|
||||
'MIME-Version' => '1.0',
|
||||
'Content-Type' => 'text/plain; charset=UTF-8',
|
||||
|
|
Loading…
Reference in a new issue