fix boolean field
authornupplaPhil <admin@philipp.info>
Sun, 26 Jan 2020 19:41:53 +0000 (20:41 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 26 Jan 2020 20:35:04 +0000 (21:35 +0100)
src/Object/EMail.php
src/Object/EMail/IEmail.php
src/Util/Emailer.php

index 5985b3f..496729a 100644 (file)
@@ -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;
index cd654b9..24df41b 100644 (file)
@@ -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
index 9490b5c..f2f1ede 100644 (file)
@@ -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" .