/**
  * Build and set all the view properties needed to render the templated emails.
  * If there is no template set, the $content will be returned in a hash
  * of the text content types for the email.
  *
  * @param string $content The content passed in from send() in most cases.
  * @return array The rendered content with html and text keys.
  */
 protected function _renderTemplates($content)
 {
     $rendered = parent::_renderTemplates($content);
     array_walk($rendered, function (&$val, $key) {
         $tmpRow = '';
         $val = base64_encode($val);
         $length = strlen($val);
         for ($offset = 0; $offset < $length; $offset += self::$_maxLength) {
             $tmpRow .= substr($val, $offset, self::$_maxLength);
             $tmpRow .= "\n";
         }
         $val = $tmpRow;
     });
     return $rendered;
 }