From 4efba4d0cf55711eeaa8076b75e4e49ae75f603f Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sun, 26 Jan 2020 20:41:53 +0100 Subject: [PATCH] fix boolean field --- src/Object/EMail.php | 4 ++-- src/Object/EMail/IEmail.php | 4 ++-- src/Util/Emailer.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Object/EMail.php b/src/Object/EMail.php index 5985b3f3b..496729a15 100644 --- a/src/Object/EMail.php +++ b/src/Object/EMail.php @@ -91,9 +91,9 @@ class EMail implements IEmail /** * {@inheritDoc} */ - public function getMessage(bool $text = false) + public function getMessage(bool $plain = false) { - if ($text) { + if ($plain) { return $this->msgText; } else { return $this->msgHtml; diff --git a/src/Object/EMail/IEmail.php b/src/Object/EMail/IEmail.php index cd654b9d3..24df41b15 100644 --- a/src/Object/EMail/IEmail.php +++ b/src/Object/EMail/IEmail.php @@ -56,11 +56,11 @@ interface IEmail /** * Gets the message body of this email (either html or plaintext) * - * @param boolean $text True, if returned as plaintext + * @param boolean $plain True, if returned as plaintext * * @return string */ - function getMessage(bool $text = false); + function getMessage(bool $plain = false); /** * Gets any additional mail header diff --git a/src/Util/Emailer.php b/src/Util/Emailer.php index 9490b5c31..f2f1edecc 100644 --- a/src/Util/Emailer.php +++ b/src/Util/Emailer.php @@ -77,8 +77,8 @@ class Emailer "Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\""; // assemble the final multipart message body with the text and html types included - $textBody = chunk_split(base64_encode($email->getMessage())); - $htmlBody = chunk_split(base64_encode($email->getMessage(true))); + $textBody = chunk_split(base64_encode($email->getMessage(true))); + $htmlBody = chunk_split(base64_encode($email->getMessage())); $multipartMessageBody = "--" . $mimeBoundary . "\n" . // plain text section "Content-Type: text/plain; charset=UTF-8\n" . "Content-Transfer-Encoding: base64\n\n" .