|
|
@@ -1313,6 +1313,9 @@ class CakeEmail {
|
|
|
* @return array Wrapped message
|
|
|
*/
|
|
|
protected function _wrap($message, $wrapLength = CakeEmail::LINE_LENGTH_MUST) {
|
|
|
+ if (strlen($message) == 0) {
|
|
|
+ return array('');
|
|
|
+ }
|
|
|
$message = str_replace(array("\r\n", "\r"), "\n", $message);
|
|
|
$lines = explode("\n", $message);
|
|
|
$formatted = array();
|
|
|
@@ -1640,8 +1643,11 @@ class CakeEmail {
|
|
|
$layout = false;
|
|
|
}
|
|
|
|
|
|
- foreach ($types as $type) {
|
|
|
+ if ($View->get('content') == '') {
|
|
|
$View->set('content', $content);
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($types as $type) {
|
|
|
$View->hasRendered = false;
|
|
|
$View->viewPath = $View->layoutPath = 'Emails' . DS . $type;
|
|
|
|