From 69b33a7f9237d713a1c6fcc4e0405d40826afc8f Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 4 May 2021 16:23:24 +0200 Subject: [PATCH] Bugfix: Now Ampelmail is sending HTML content correctly ...so that the eMail client can parse and display HTML content correctly. Signed-off-by: cris-technikum --- system/ampel_erinnerungsmail.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/ampel_erinnerungsmail.php b/system/ampel_erinnerungsmail.php index 02b882965..ae7efc3e1 100644 --- a/system/ampel_erinnerungsmail.php +++ b/system/ampel_erinnerungsmail.php @@ -43,6 +43,12 @@ foreach($ampel->result as $a) $uid = $row->uid; $mail = new mail($uid.'@'.DOMAIN, 'cis@'.DOMAIN, $subject, $message); + + // If message has HTML content + if($message != strip_tags($message)) { + $mail->setHTMLContent(sprintf('%s', $message)); + } + if($mail->send()) echo "Email an $uid versandt\n"; else