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" .