File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -518,9 +518,9 @@ file or stream::
518518 $email = (new Email())
519519 // ...
520520 // get the image contents from a PHP resource
521- ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo')
521+ ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo', 'image/png' )
522522 // get the image contents from an existing file
523- ->embedFromPath('/path/to/images/signature.gif', 'footer-signature')
523+ ->embedFromPath('/path/to/images/signature.gif', 'footer-signature', 'image/gif' )
524524 ;
525525
526526The second optional argument of both methods is the image name ("Content-ID" in
@@ -529,8 +529,9 @@ images inside the HTML contents::
529529
530530 $email = (new Email())
531531 // ...
532- ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo')
533- ->embedFromPath('/path/to/images/signature.gif', 'footer-signature')
532+ ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo', 'image/png')
533+ ->embedFromPath('/path/to/images/signature.gif', 'footer-signature', 'image/gif')
534+
534535 // reference images using the syntax 'cid:' + "image embed name"
535536 ->html('<img src="cid:logo"> ... <img src="cid:footer-signature"> ...')
536537 ;
You can’t perform that action at this time.
0 commit comments