Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d26530

Browse files
committed
bug #39980 [Mailer][Mime] Update inline part names with newly generated ContentId (ddegentesh)
This PR was submitted for the 5.2 branch but it was squashed and merged into the 4.4 branch instead. Discussion ---------- [Mailer][Mime] Update inline part names with newly generated ContentId Inline parts are identified by matching attachment names to cids found in the html part. In line 487 cids are regenerated and replaced in the html part, but the attachment names were not similarly replaced. | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT Commits ------- eb14a1e [Mailer][Mime] Update inline part names with newly generated ContentId
2 parents 2eddb51 + eb14a1e commit 2d26530

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Mime/Email.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ private function prepareParts(): ?array
491491
$attachment['inline'] = true;
492492
$inlineParts[$name] = $part = $this->createDataPart($attachment);
493493
$html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html);
494+
$part->setName($part->getContentId());
494495
continue 2;
495496
}
496497
$attachmentParts[] = $this->createDataPart($attachment);

0 commit comments

Comments
 (0)