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 @@ -458,9 +458,9 @@ file or stream::
458458 $email = (new Email())
459459 // ...
460460 // get the image contents from a PHP resource
461- ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo')
461+ ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo', 'image/png' )
462462 // get the image contents from an existing file
463- ->embedFromPath('/path/to/images/signature.gif', 'footer-signature')
463+ ->embedFromPath('/path/to/images/signature.gif', 'footer-signature', 'image/gif' )
464464 ;
465465
466466The second optional argument of both methods is the image name ("Content-ID" in
@@ -469,8 +469,9 @@ images inside the HTML contents::
469469
470470 $email = (new Email())
471471 // ...
472- ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo')
473- ->embedFromPath('/path/to/images/signature.gif', 'footer-signature')
472+ ->embed(fopen('/path/to/images/logo.png', 'r'), 'logo', 'image/png')
473+ ->embedFromPath('/path/to/images/signature.gif', 'footer-signature', 'image/gif')
474+
474475 // reference images using the syntax 'cid:' + "image embed name"
475476 ->html('<img src="cid:logo"> ... <img src="cid:footer-signature"> ...')
476477 ;
You can’t perform that action at this time.
0 commit comments