File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -658,16 +658,18 @@ images inside the HTML contents::
658658 ->html('... <div background="cid:footer-signature"> ... </div> ...')
659659 ;
660660
661+ The actual Content-ID value present in the e-mail source will be randomly generated by Symfony.
662+
661663You can also use the :method: `DataPart::setContentId() <Symfony\\ Component\\ Mime\\ Part\\ DataPart::setContentId> `
662664method to define a custom Content-ID for the image and use it as its ``cid `` reference::
663665
664666 $part = new DataPart(new File('/path/to/images/signature.gif'));
665- $part->setContentId('footer-signature');
667+ $part->setContentId('footer-signature@my-app ');
666668
667669 $email = (new Email())
668670 // ...
669671 ->addPart($part->asInline())
670- ->html('... <img src="cid:footer-signature"> ...')
672+ ->html('... <img src="cid:footer-signature@my-app "> ...')
671673 ;
672674
673675.. versionadded :: 6.1
You can’t perform that action at this time.
0 commit comments