Permalink
Browse files

allow callbacks to modify attachements by moving the decision to calc…

…ulate boundary value into the correct position inside _render()
  • Loading branch information...
1 parent 468eb94 commit 0ca1ba32116574401e1a9ba990ad015b83656e5c @dereuromark dereuromark committed Jun 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Network/Email/CakeEmail.php
View
2 lib/Cake/Network/Email/CakeEmail.php
@@ -1071,7 +1071,6 @@ public function send($content = null) {
}
$this->_textMessage = $this->_htmlMessage = '';
- $this->_createBoundary();
$this->_message = $this->_render($this->_wrap($content));
$contents = $this->transportClass()->send($this);
@@ -1447,6 +1446,7 @@ protected function _render($content) {
$content = implode("\n", $content);
$rendered = $this->_renderTemplates($content);
+ $this->_createBoundary();
$msg = array();
$contentIds = array_filter((array)Hash::extract($this->_attachments, '{s}.contentId'));

0 comments on commit 0ca1ba3

Please sign in to comment.