fix boolean field
This commit is contained in:
parent
2b8f067715
commit
4efba4d0cf
3 changed files with 6 additions and 6 deletions
|
@ -91,9 +91,9 @@ class EMail implements IEmail
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function getMessage(bool $text = false)
|
public function getMessage(bool $plain = false)
|
||||||
{
|
{
|
||||||
if ($text) {
|
if ($plain) {
|
||||||
return $this->msgText;
|
return $this->msgText;
|
||||||
} else {
|
} else {
|
||||||
return $this->msgHtml;
|
return $this->msgHtml;
|
||||||
|
|
|
@ -56,11 +56,11 @@ interface IEmail
|
||||||
/**
|
/**
|
||||||
* Gets the message body of this email (either html or plaintext)
|
* 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
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getMessage(bool $text = false);
|
function getMessage(bool $plain = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets any additional mail header
|
* Gets any additional mail header
|
||||||
|
|
|
@ -77,8 +77,8 @@ class Emailer
|
||||||
"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
|
"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
|
||||||
|
|
||||||
// assemble the final multipart message body with the text and html types included
|
// assemble the final multipart message body with the text and html types included
|
||||||
$textBody = chunk_split(base64_encode($email->getMessage()));
|
$textBody = chunk_split(base64_encode($email->getMessage(true)));
|
||||||
$htmlBody = chunk_split(base64_encode($email->getMessage(true)));
|
$htmlBody = chunk_split(base64_encode($email->getMessage()));
|
||||||
$multipartMessageBody = "--" . $mimeBoundary . "\n" . // plain text section
|
$multipartMessageBody = "--" . $mimeBoundary . "\n" . // plain text section
|
||||||
"Content-Type: text/plain; charset=UTF-8\n" .
|
"Content-Type: text/plain; charset=UTF-8\n" .
|
||||||
"Content-Transfer-Encoding: base64\n\n" .
|
"Content-Transfer-Encoding: base64\n\n" .
|
||||||
|
|
Loading…
Reference in a new issue