it seems there are mail client ignoring / not displaying text behind the closing style-tag --> add a linebreak there

This commit is contained in:
ralf 2024-02-20 17:01:00 +02:00
parent bca69ff8f3
commit 90c340cf2a

View File

@ -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'] .= '<blockquote type="cite">';
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'], '</style><') !== false)
{
$_formData['body'] = str_replace('</style><', "</style>\n<", $_formData['body']);
}
$this->sessionData['mailaccount'] = $_formData['mailaccount'];
$this->sessionData['to'] = self::resolveEmailAddressList($_formData['to']);
$this->sessionData['cc'] = self::resolveEmailAddressList($_formData['cc']);