mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +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[] = '--' . $boundary;
|
||||||
$msg[] = 'Content-Type: multipart/related; boundary="rel-' . $boundary . '"';
|
$msg[] = 'Content-Type: multipart/related; boundary="rel-' . $boundary . '"';
|
||||||
$msg[] = '';
|
$msg[] = '';
|
||||||
$relBoundary = 'rel-' . $boundary;
|
$relBoundary = $textBoundary = 'rel-' . $boundary;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($hasMultipleTypes) {
|
if ($hasMultipleTypes) {
|
||||||
|
|
|
@ -865,7 +865,7 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
"\r\n" .
|
"\r\n" .
|
||||||
"--alt-{$boundary}--\r\n" .
|
"--alt-{$boundary}--\r\n" .
|
||||||
"\r\n" .
|
"\r\n" .
|
||||||
"--$boundary\r\n" .
|
"--rel-$boundary\r\n" .
|
||||||
"Content-Type: application/octet-stream\r\n" .
|
"Content-Type: application/octet-stream\r\n" .
|
||||||
"Content-Transfer-Encoding: base64\r\n" .
|
"Content-Transfer-Encoding: base64\r\n" .
|
||||||
"Content-ID: <abc123>\r\n" .
|
"Content-ID: <abc123>\r\n" .
|
||||||
|
|
Loading…
Reference in a new issue