allow callbacks to modify attachements by moving the decision to calculate boundary value into the correct position inside _render()

This commit is contained in:
euromark 2013-06-26 02:20:31 +02:00
parent 468eb94e94
commit 0ca1ba3211

View file

@ -1071,7 +1071,6 @@ class CakeEmail {
} }
$this->_textMessage = $this->_htmlMessage = ''; $this->_textMessage = $this->_htmlMessage = '';
$this->_createBoundary();
$this->_message = $this->_render($this->_wrap($content)); $this->_message = $this->_render($this->_wrap($content));
$contents = $this->transportClass()->send($this); $contents = $this->transportClass()->send($this);
@ -1447,6 +1446,7 @@ class CakeEmail {
$content = implode("\n", $content); $content = implode("\n", $content);
$rendered = $this->_renderTemplates($content); $rendered = $this->_renderTemplates($content);
$this->_createBoundary();
$msg = array(); $msg = array();
$contentIds = array_filter((array)Hash::extract($this->_attachments, '{s}.contentId')); $contentIds = array_filter((array)Hash::extract($this->_attachments, '{s}.contentId'));