From 58a50b73514150dbf0b54ee7ea4392e3be87c5e0 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 18 Oct 2010 22:51:54 +0000 Subject: [PATCH] BUGFIX: Applied/edited paradigmincarnate's patch to quote plaintext email with htmlEmail (#5120) (from r108396) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112723 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- email/Mailer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/email/Mailer.php b/email/Mailer.php index 588bf944e..d3df7ad72 100644 --- a/email/Mailer.php +++ b/email/Mailer.php @@ -72,7 +72,7 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $ $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)); + $plainPart = processHeaders($headers, ($plainEncoding == "base64") ? chunk_split(base64_encode($plainContent),60) : wordwrap(QuotedPrintable_encode($plainContent),120)); // Make the HTML part $headers["Content-Type"] = "text/html; charset=\"utf-8\""; @@ -83,10 +83,10 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $ $htmlContent = "\n" . "\n" . - "\n" . - "\n\n". + "\n" . + "\n\n". "\n" . - "\n" . + "\n" . $htmlContent . "\n\n" . "";