Renamed the default X-Mailer value.

This commit is contained in:
Juan Basso 2011-04-22 22:41:52 -04:00
parent 636b48024d
commit 6a7b42f1eb
3 changed files with 7 additions and 9 deletions

View file

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

View file

@ -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[] = '';

View file

@ -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',