Created
March 16, 2012 09:00
-
-
Save slywalker/2049221 to your computer and use it in GitHub Desktop.
メールの文字化けが怖いあなたに
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('CakeEmail', 'Network/Email'); | |
class Base64Email extends CakeEmail { | |
protected function _renderTemplates($content) { | |
$rendered = parent::_renderTemplates($content); | |
array_walk($rendered, function(&$val, $key) { | |
$val = base64_encode($val); | |
}); | |
return $rendered; | |
} | |
protected function _getContentTransferEncoding() { | |
return 'base64'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment