From e1a0cca5cc6ee5e9aae97578123ea00c36aaa980 Mon Sep 17 00:00:00 2001 From: Arnold Bechtoldt Date: Tue, 21 Aug 2012 14:12:15 +0200 Subject: [PATCH] Don't change PHPMailer core just modify public charset object-var, refs #1117 Signed-off-by: Arnold Bechtoldt --- lib/classes/phpmailer/class.PHPMailer.php | 2 +- lib/init.php | 2 ++ scripts/jobs/cron_autoresponder.php | 1 + scripts/jobs/cron_usage_report.php | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/classes/phpmailer/class.PHPMailer.php b/lib/classes/phpmailer/class.PHPMailer.php index d60fcd23..b86df1b4 100644 --- a/lib/classes/phpmailer/class.PHPMailer.php +++ b/lib/classes/phpmailer/class.PHPMailer.php @@ -56,7 +56,7 @@ class PHPMailer { * Sets the CharSet of the message. * @var string */ - public $CharSet = 'UTF-8'; + public $CharSet = 'iso-8859-1'; /** * Sets the Content-type of the message. diff --git a/lib/init.php b/lib/init.php index fd487b06..026ca6cf 100644 --- a/lib/init.php +++ b/lib/init.php @@ -500,6 +500,8 @@ if($page == '') * Initialize the mailingsystem */ $mail = new PHPMailer(true); +$mail->CharSet = "UTF-8"; + if(PHPMailer::ValidateAddress($settings['panel']['adminmail']) !== false) { // set return-to address and custom sender-name, see #76 diff --git a/scripts/jobs/cron_autoresponder.php b/scripts/jobs/cron_autoresponder.php index 93f4e1d0..c826c3d3 100644 --- a/scripts/jobs/cron_autoresponder.php +++ b/scripts/jobs/cron_autoresponder.php @@ -226,6 +226,7 @@ if($db->num_rows($result) > 0) $_mailerror = false; try { + $mail->CharSet = "UTF-8"; $mail->SetFrom($to, $to); $mail->AddReplyTo($to, $to); $mail->Subject = $row['subject']; diff --git a/scripts/jobs/cron_usage_report.php b/scripts/jobs/cron_usage_report.php index 1527fcb3..d3cd25e3 100644 --- a/scripts/jobs/cron_usage_report.php +++ b/scripts/jobs/cron_usage_report.php @@ -24,6 +24,8 @@ $yesterday = time() - (60 * 60 * 24); * Initialize the mailingsystem */ $mail = new PHPMailer(true); + +$mail->CharSet = "UTF-8"; $mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator'); // Warn the customers at xx% traffic-usage