mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:28:45 +01:00
* email: fix bug in MailMerge; Mail-Templates with text/html only were not processed as text/html but as text/plain; now this is handeled correctly/as expected
This commit is contained in:
parent
e04a1d8519
commit
90f86b3504
@ -4282,8 +4282,19 @@ class felamimail_bo
|
||||
$mailObject->ClearCustomHeaders();
|
||||
$mailObject->AddAddress($email,$mailObject->EncodeHeader($nfn));
|
||||
$mailObject->Subject = $bo_merge->merge_string($Subject, $val, $e, 'text/plain');
|
||||
if (!empty($AltBody)) $mailObject->IsHTML(true);
|
||||
else $mailObject->IsHTML(false);
|
||||
if (!empty($AltBody))
|
||||
{
|
||||
$mailObject->IsHTML(true);
|
||||
}
|
||||
elseif (empty($AltBody) && $mailObject->BodyContentType=='text/html')
|
||||
{
|
||||
$mailObject->IsHTML(true);
|
||||
$AltBody = self::convertHTMLToText($Body,false,$stripalltags=true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailObject->IsHTML(false);
|
||||
}
|
||||
//error_log(__METHOD__.__LINE__.' ContentType:'.$mailObject->BodyContentType);
|
||||
if (!empty($Body)) $mailObject->Body = $bo_merge->merge_string($Body, $val, $e, $mailObject->BodyContentType);
|
||||
//error_log(__METHOD__.__LINE__.' Result:'.$mailObject->Body.' error:'.array2string($e));
|
||||
@ -4342,8 +4353,19 @@ class felamimail_bo
|
||||
$mailObject->AddAddress($email,$mailObject->EncodeHeader($nfn));
|
||||
}
|
||||
$mailObject->Subject = $bo_merge->merge_string($Subject, $val, $e, 'text/plain');
|
||||
if (!empty($AltBody)) $mailObject->IsHTML(true);
|
||||
else $mailObject->IsHTML(false);
|
||||
if (!empty($AltBody))
|
||||
{
|
||||
$mailObject->IsHTML(true);
|
||||
}
|
||||
elseif (empty($AltBody) && $mailObject->BodyContentType=='text/html')
|
||||
{
|
||||
$mailObject->IsHTML(true);
|
||||
$AltBody = self::convertHTMLToText($Body,false,$stripalltags=true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailObject->IsHTML(false);
|
||||
}
|
||||
//error_log(__METHOD__.__LINE__.' ContentType:'.$mailObject->BodyContentType);
|
||||
if (!empty($Body)) $mailObject->Body = $bo_merge->merge_string($Body, $val, $e, $mailObject->BodyContentType);
|
||||
//error_log(__METHOD__.__LINE__.' Result:'.$mailObject->Body.' error:'.array2string($e));
|
||||
|
Loading…
Reference in New Issue
Block a user