Add charset() / headerCharset() methods to CakeEmail class #567

Merged
merged 1 commit into from Mar 16, 2012

Projects

None yet

2 participants

Member
suzuki commented Mar 16, 2012

original pull request was #564. change branch to 2.2.


CakeEmail have many setter / getter methods for mail headers.
But, charset and headerChaset have a only property.

This is a strange. see below :

  • now
$email = new CakeEmail;

$email->charset = 'ISO-2022-JP';       // strange here
$email->headerCharset = 'ISO-2022-JP'; // strange here

$email->from('suzuki@example.com');
$email->to('suzuki@example.jp);
$emaul->subject('TEST MAIL');
$email->send('TEST MAIL BODY');
  • my patch
$email = new CakeEmail;

$email->charset('ISO-2022-JP');       // this is nice accessor.
$email->headerCharset('ISO-2022-JP'); // this is nice accessor.

$email->from('suzuki@example.com');
$email->to('suzuki@example.jp);
$emaul->subject('TEST MAIL');
$email->send('TEST MAIL BODY');
Owner
lorenzo commented Mar 16, 2012

Thanks!

@lorenzo lorenzo merged commit 47a2c22 into cakephp:2.2 Mar 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment