Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Docs Fix: Add in the required type for the content part #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/book/message/attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ $content = new MimeMessage();
// This order is important for email clients to properly display the correct version of the content
$content->setParts([$text, $html]);

$contentPart = new MimePart($content->generateMessage());
$contentPart = new MimePart($content->generateMessage());
$contentPart->type = 'multipart/alternative; boundary="' . $contentPart->getMime()->boundary() . '"';

$image = new MimePart(fopen($pathToImage, 'r'));
$image->type = 'image/jpeg';
Expand Down