From 00ab4ee59ace5fcd6827bf8d306f2ffde90e8dea Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Tue, 11 May 2010 11:32:07 +0000 Subject: [PATCH] Added charset selection for email content. --- reporting/includes/class.mail.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reporting/includes/class.mail.inc b/reporting/includes/class.mail.inc index 7e6be6f9..7f3b77b1 100644 --- a/reporting/includes/class.mail.inc +++ b/reporting/includes/class.mail.inc @@ -21,7 +21,8 @@ class email var $header = ""; var $subject = ""; var $body = ""; - + var $charset = 'ISO-8859-1'; + function email($name, $mail) { $this->boundary = md5(uniqid(time())); @@ -55,14 +56,14 @@ class email function text($text) { - $this->body = "Content-Type: text/plain; charset=ISO-8859-1\n"; + $this->body = "Content-Type: text/plain; charset={$this->charset}\n"; $this->body .= "Content-Transfer-Encoding: 8bit\n\n"; $this->body .= $text."\n"; } function html($html) { - $this->body = "Content-Type: text/html; charset=ISO-8859-1\n"; + $this->body = "Content-Type: text/html; charset={$this->charset}\n"; $this->body .= "Content-Transfer-Encoding: quoted-printable\n\n"; $this->body .= "\n".$html."\n\n"; } -- 2.30.2