Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.