mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
29cfdb4b41
commit
4d73f4e6a1
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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" .
|
||||
|
|
Loading…
Reference in a new issue