Skip to content

Commit 728f6f6

Browse files
BlueMjaviereguiluz
authored andcommitted
Fix subtype in TextPart constructor calls
In examples, 'html' is given as argument 2, while it has to be argument 3
1 parent 652352c commit 728f6f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/mime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ different parts of the email by hand::
170170
;
171171

172172
$textContent = new TextPart('Lorem ipsum...');
173-
$htmlContent = new TextPart('<h1>Lorem ipsum</h1> <p>...</p>', 'html');
173+
$htmlContent = new TextPart('<h1>Lorem ipsum</h1> <p>...</p>', null, 'html');
174174
$body = new AlternativePart($textContent, $htmlContent);
175175

176176
$email = new Message($headers, $body);
@@ -192,7 +192,7 @@ email multiparts::
192192
$textContent = new TextPart('Lorem ipsum...');
193193
$htmlContent = new TextPart(sprintf(
194194
'<img src="cid:%s"/> <h1>Lorem ipsum</h1> <p>...</p>', $imageCid
195-
), 'html');
195+
), null, 'html');
196196
$bodyContent = new AlternativePart($textContent, $htmlContent);
197197
$body = new RelatedPart($bodyContent, $embeddedImage);
198198

0 commit comments

Comments
 (0)