diff --git a/src/Object/EMail/IEmail.php b/src/Object/EMail/IEmail.php index f1e66a224..9fd1fe3da 100644 --- a/src/Object/EMail/IEmail.php +++ b/src/Object/EMail/IEmail.php @@ -80,7 +80,7 @@ interface IEmail extends JsonSerializable * * @return string */ - function getMessage(bool $plain = false); + function getMessage(bool $plain = false): string; /** * Gets the additional mail header array diff --git a/src/Object/Email.php b/src/Object/Email.php index 57eb0c17e..4d5a11715 100644 --- a/src/Object/Email.php +++ b/src/Object/Email.php @@ -110,12 +110,12 @@ class Email implements IEmail /** * {@inheritDoc} */ - public function getMessage(bool $plain = false) + public function getMessage(bool $plain = false): string { if ($plain) { return $this->msgText; } else { - return $this->msgHtml; + return $this->msgHtml ?? ''; } }