From 2baec71e40e2636263f8f859e13e29f431add1f8 Mon Sep 17 00:00:00 2001 From: Marcel Ulbrich Date: Tue, 21 May 2019 17:55:44 +0200 Subject: [PATCH] Adjust docs about setting the email body Using "setBody" a second time on the mail object overrides the first call. To add a body with another content type you need to use "addPart". At the moment the documentation about that is rather confusing. --- Documentation/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/index.rst b/Documentation/index.rst index 7825bbe..e0c3aa1 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -78,8 +78,8 @@ Here is an example: ->setTo(array($recipientAddress => $recipientName)) ->setSubject($subject); - $mail->setBody($message, 'text/html'); - $mail->setBody($message, 'text/plain'); + $mail->setBody($messageTxt, 'text/plain'); + $mail->addPart($messageHtml, 'text/html'); $mail->send();