File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -616,11 +616,27 @@ images inside the HTML contents::
616
616
->html('... <div background="cid:footer-signature"> ... </div> ...')
617
617
;
618
618
619
+ You can also use :method: `DataPart::setContentId() <Symfony\\ Component\\ Mime\\ Part\\ DataPart::setContentId> ` method to
620
+ define value and use it as ``cid `` reference::
621
+
622
+ $part = new DataPart(new File('/path/to/images/signature.gif'));
623
+ $part->setContentId('footer-signature');
624
+
625
+ $email = (new Email())
626
+ // ...
627
+ ->addPart($part->asInline())
628
+ ->html('... <img src="cid:footer-signature"> ...')
629
+ ;
630
+
619
631
.. versionadded :: 6.1
620
632
621
633
The support of embedded images as HTML backgrounds was introduced in Symfony
622
634
6.1.
623
635
636
+ .. versionadded :: 6.3
637
+
638
+ The support of custom ``cid `` for embedded images was introduced in Symfony 6.3.
639
+
624
640
.. _mailer-configure-email-globally :
625
641
626
642
Configuring Emails Globally
You can’t perform that action at this time.
0 commit comments