From fb99e578136630f6d8f17d95c14a10678585e5a7 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 6 Feb 2008 23:06:49 +0000 Subject: [PATCH] #2137 - Changed email encoding from iso-8859-15 to utf-8, in compliance with other parts of SilverStripe and IMC recommendations git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49142 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/Email.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/Email.php b/core/Email.php index f7c88a1c7..473fe4757 100755 --- a/core/Email.php +++ b/core/Email.php @@ -440,13 +440,13 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $ // Make the plain text part - $headers["Content-Type"] = "text/plain; charset=\"iso-8859-15\""; + $headers["Content-Type"] = "text/plain; charset=\"utf-8\""; $headers["Content-Transfer-Encoding"] = $plainEncoding ? $plainEncoding : "quoted-printable"; $plainPart = processHeaders($headers, ($plainEncoding == "base64") ? chunk_split(base64_encode($plainContent),60) : wordwrap($plainContent,120)); // Make the HTML part - $headers["Content-Type"] = "text/html; charset=\"iso-8859-15\""; + $headers["Content-Type"] = "text/html; charset=\"utf-8\""; // Add basic wrapper tags if the body tag hasn't been given @@ -454,7 +454,7 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $ $htmlContent = "\n" . "\n" . - "\n" . + "\n" . "\n\n". "\n" . "\n" . @@ -558,7 +558,7 @@ function plaintextEmail($to, $from, $subject, $plainContent, $attachedFiles, $cu // Make the plain text part - $headers["Content-Type"] = "text/plain; charset=\"iso-8859-15\""; + $headers["Content-Type"] = "text/plain; charset=\"utf-8\""; $headers["Content-Transfer-Encoding"] = $plainEncoding ? $plainEncoding : "quoted-printable"; $plainContent = ($plainEncoding == "base64") ? chunk_split(base64_encode($plainContent),60) : QuotedPrintable_encode($plainContent); @@ -663,7 +663,7 @@ function wrapImagesInline($htmlContent) { // Make the HTML part - $headers["Content-Type"] = "text/html; charset=\"iso-8859-15\""; + $headers["Content-Type"] = "text/html; charset=\"utf-8\""; $headers["Content-Transfer-Encoding"] = "quoted-printable"; $multiparts[] = processHeaders($headers, QuotedPrintable_encode($replacedContent));