aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php2
-rw-r--r--lib/private/Mail/EMailTemplate.php7
-rw-r--r--lib/public/Mail/IEMailTemplate.php3
3 files changed, 8 insertions, 4 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 8f63ef028d9..f2c68f9376d 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -264,7 +264,7 @@ class ShareByMailProvider implements IShareProvider {
$emailTemplate = $this->mailer->createEMailTemplate();
$emailTemplate->addHeader();
- $emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$ownerDisplayName, $filename]));
+ $emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$ownerDisplayName, $filename]), false);
if ($owner === $initiator) {
$text = $this->l->t('%s shared »%s« with you.', [$ownerDisplayName, $filename]);
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index bfaee72bedd..f82ddc689eb 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -353,7 +353,8 @@ EOF;
* Adds a paragraph to the body of the email
*
* @param string $text
- * @param string $plainText Text that is used in the plain text email - if empty the $text is used
+ * @param string|bool $plainText Text that is used in the plain text email
+ * if empty the $text is used, if false none will be used
*/
public function addBodyText($text, $plainText = '') {
if ($this->footerAdded) {
@@ -369,7 +370,9 @@ EOF;
}
$this->htmlBody .= vsprintf($this->bodyText, [htmlspecialchars($text)]);
- $this->plainBody .= $plainText . PHP_EOL . PHP_EOL;
+ if ($plainText !== false) {
+ $this->plainBody .= $plainText . PHP_EOL . PHP_EOL;
+ }
}
/**
diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php
index d0123f22739..8e3233ee426 100644
--- a/lib/public/Mail/IEMailTemplate.php
+++ b/lib/public/Mail/IEMailTemplate.php
@@ -72,7 +72,8 @@ interface IEMailTemplate {
* Adds a paragraph to the body of the email
*
* @param string $text
- * @param string $plainText Text that is used in the plain text email - if empty the $text is used
+ * @param string|bool $plainText Text that is used in the plain text email
+ * if empty the $text is used, if false none will be used
*
* @since 12.0.0
*/