Skip to content

Commit b67d08b

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: docs: Add the mime type in the example
2 parents 5a02dc1 + be6992c commit b67d08b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mailer.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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

466466
The 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
;

0 commit comments

Comments
 (0)