Fix boundaries used in multi-part messages.

Inline attachments should use the multipart/related boundary.  Otherwise
sections will be incorrectly nested.

Fixes #2413
This commit is contained in:
mark_story 2012-01-11 20:44:42 -05:00
parent 29cfdb4b41
commit 4d73f4e6a1
2 changed files with 2 additions and 2 deletions

View file

@ -1323,7 +1323,7 @@ class CakeEmail {
$msg[] = '--' . $boundary;
$msg[] = 'Content-Type: multipart/related; boundary="rel-' . $boundary . '"';
$msg[] = '';
$relBoundary = 'rel-' . $boundary;
$relBoundary = $textBoundary = 'rel-' . $boundary;
}
if ($hasMultipleTypes) {

View file

@ -865,7 +865,7 @@ class CakeEmailTest extends CakeTestCase {
"\r\n" .
"--alt-{$boundary}--\r\n" .
"\r\n" .
"--$boundary\r\n" .
"--rel-$boundary\r\n" .
"Content-Type: application/octet-stream\r\n" .
"Content-Transfer-Encoding: base64\r\n" .
"Content-ID: <abc123>\r\n" .