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
-------
eb14a1e1f0
[Mailer][Mime] Update inline part names with newly generated ContentId
This commit is contained in:
commit
2d2653042a
@ -491,6 +491,7 @@ class Email extends Message
|
|||||||
$attachment['inline'] = true;
|
$attachment['inline'] = true;
|
||||||
$inlineParts[$name] = $part = $this->createDataPart($attachment);
|
$inlineParts[$name] = $part = $this->createDataPart($attachment);
|
||||||
$html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html);
|
$html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html);
|
||||||
|
$part->setName($part->getContentId());
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
$attachmentParts[] = $this->createDataPart($attachment);
|
$attachmentParts[] = $this->createDataPart($attachment);
|
||||||
|
Reference in New Issue
Block a user