Skip to content

Commit be6992c

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: docs: Add the mime type in the example
2 parents e5dbbdc + 959c06d commit be6992c

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
@@ -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

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

0 commit comments

Comments
 (0)