Skip to content

Commit 17b0988

Browse files
[FIX] Mail: Use raw body for alternative mime mail part
1 parent acfd727 commit 17b0988

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

components/ILIAS/Mail/classes/class.ilMimeMail.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,15 @@ protected function buildBodyMultiParts(string $skin, string $style): void
264264
$this->body = ' ';
265265
}
266266

267-
$body = $this->to_html_transformation ? ($this->to_html_transformation)($this->body) : $this->body;
267+
$transformed_body = $this->to_html_transformation ? ($this->to_html_transformation)($this->body) : $this->body;
268268

269-
$contains_html = $this->containsHtmlBlockElementsOrLineBreaks($body);
269+
$contains_html = $this->containsHtmlBlockElementsOrLineBreaks($transformed_body);
270270
if ($contains_html) {
271-
$this->final_body_alt = strip_tags(str_ireplace(['<br />', '<br>', '<br/>'], "\n", $body));
272-
$this->body = $body;
271+
$this->final_body_alt = strip_tags(str_ireplace(['<br />', '<br>', '<br/>'], "\n", $this->body));
272+
$this->body = $transformed_body;
273273
} else {
274-
$this->final_body_alt = strip_tags($body);
275-
$this->body = nl2br($body);
274+
$this->final_body_alt = strip_tags($this->body);
275+
$this->body = nl2br($transformed_body);
276276
}
277277

278278
$body_with_clickable_urls = $this->refinery->string()->makeClickable()->transform($this->body);

0 commit comments

Comments
 (0)