From 2134ac9165d866f835964527831f61241a0c9d62 Mon Sep 17 00:00:00 2001
From: Gary Lockett <gary@hownowcreativecow.co.uk>
Date: Mon, 17 Jun 2019 17:57:26 +0100
Subject: [PATCH] Add in the required type for the content part

The current documentation is missing this crucial requirement for the multipart/alternative + attachments section.
---
 docs/book/message/attachments.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/book/message/attachments.md b/docs/book/message/attachments.md
index 82b9ee3a..ffe8ffbe 100644
--- a/docs/book/message/attachments.md
+++ b/docs/book/message/attachments.md
@@ -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';