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::
667667Use the ``asInline() `` method to embed the content instead of attaching it.
668668
669669The 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::
672672
673673 $email = (new Email())
674674 // ...
@@ -683,11 +683,11 @@ images inside the HTML contents::
683683 ;
684684
685685The actual Content-ID value present in the e-mail source will be randomly generated by Symfony.
686-
687686You can also use the :method: `DataPart::setContentId() <Symfony\\ Component\\ Mime\\ Part\\ DataPart::setContentId> `
688687method to define a custom Content-ID for the image and use it as its ``cid `` reference::
689688
690689 $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
691691 $part->setContentId('footer-signature@my-app');
692692
693693 $email = (new Email())
You can’t perform that action at this time.
0 commit comments