From 90c340cf2a8f20c9536ac31c0255efc70e0be61a Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 20 Feb 2024 17:01:00 +0200 Subject: [PATCH] it seems there are mail client ignoring / not displaying text behind the closing style-tag --> add a linebreak there --- mail/inc/class.mail_compose.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 8c4d9237fd..200859d22c 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -800,7 +800,7 @@ class mail_compose if ($styles) { //error_log($styles); - $content['body'] = $styles.$content['body']; + $content['body'] = $styles."\n".$content['body']; } } } @@ -2330,7 +2330,7 @@ class mail_compose if($bodyParts['0']['mimeType'] == 'text/html') { $this->sessionData['mimeType'] = 'html'; - if (!empty($styles)) $this->sessionData['body'] .= $styles; + if (!empty($styles)) $this->sessionData['body'] .= "\n".$styles."\n"; $this->sessionData['body'] .= '
'; foreach($bodyParts as $i => &$bodyPart) @@ -2969,6 +2969,12 @@ class mail_compose $mail = new Api\Mailer($_acc_id ?: $mail_bo->profileID); $messageIsDraft = false; + // it seems there are mail client ignoring / not displaying text behind the closing style-tag --> add a linebreak there + if (strpos($_formData['body'], '<') !== false) + { + $_formData['body'] = str_replace('<', "\n<", $_formData['body']); + } + $this->sessionData['mailaccount'] = $_formData['mailaccount']; $this->sessionData['to'] = self::resolveEmailAddressList($_formData['to']); $this->sessionData['cc'] = self::resolveEmailAddressList($_formData['cc']);