From f54075da3a0ef79021348710752e78296e1b44f8 Mon Sep 17 00:00:00 2001 From: genuineparts Date: Thu, 5 Jun 2025 20:39:18 +0200 Subject: [PATCH] UTF8 --- inc/mail.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/inc/mail.class.php b/inc/mail.class.php index d6dc94a..414646d 100644 --- a/inc/mail.class.php +++ b/inc/mail.class.php @@ -79,16 +79,16 @@ class mail { function bodytext($text) { $this->textbody = "--" . $this->boundary . "\n"; - $this->textbody .= "Content-Type: text/plain\n"; - $this->textbody .= "Content-Transfer-Encoding: 8bit\n\n"; - $this->textbody .= $text; + $this->textbody .= "Content-Type: text/plain; charset=utf-8\n"; + $this->textbody .= "Content-Transfer-Encoding: base64\n\n"; + $this->textbody .= base64_encode($text); } function htmltext($text) { $this->htmlbody = "\n--" . $this->boundary . "\n"; - $this->htmlbody .= "Content-Type: text/html\n"; - $this->htmlbody .= "Content-Transfer-Encoding: 8bit\n\n"; - $this->htmlbody .= $text; + $this->htmlbody .= "Content-Type: text/html; charset=utf-8\n"; + $this->htmlbody .= "Content-Transfer-Encoding: base64\n\n"; + $this->htmlbody .= base64_encode($text); } function clear_bodytext() { $this->textbody = ""; } @@ -105,7 +105,7 @@ class mail { $_body .= "\n--$this->boundary--"; - mail($to, $subject, $_body, $this->get_header()); + mail($to, '=?utf-8?B?'.base64_encode($subject).'?=', $_body, $this->get_header()); } } ?>