File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -667,8 +667,8 @@ file or stream::
667
667
Use the ``asInline() `` method to embed the content instead of attaching it.
668
668
669
669
The second optional argument of both methods is the image name ("Content-ID" in
670
- the MIME standard). Its value is an arbitrary string used later to reference the
671
- images inside the HTML contents::
670
+ the MIME standard). Its value is an arbitrary string that must be unique in each
671
+ email message and is used later to reference the images inside the HTML contents::
672
672
673
673
$email = (new Email())
674
674
// ...
@@ -683,11 +683,11 @@ images inside the HTML contents::
683
683
;
684
684
685
685
The actual Content-ID value present in the e-mail source will be randomly generated by Symfony.
686
-
687
686
You can also use the :method: `DataPart::setContentId() <Symfony\\ Component\\ Mime\\ Part\\ DataPart::setContentId> `
688
687
method to define a custom Content-ID for the image and use it as its ``cid `` reference::
689
688
690
689
$part = new DataPart(new File('/path/to/images/signature.gif'));
690
+ // according to the spec, the Content-ID value must include at least one '@' character
691
691
$part->setContentId('footer-signature@my-app');
692
692
693
693
$email = (new Email())
You can’t perform that action at this time.
0 commit comments