mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
229bea6dd4
commit
58a50b7351
@ -72,7 +72,7 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
|
|||||||
$headers["Content-Type"] = "text/plain; charset=\"utf-8\"";
|
$headers["Content-Type"] = "text/plain; charset=\"utf-8\"";
|
||||||
$headers["Content-Transfer-Encoding"] = $plainEncoding ? $plainEncoding : "quoted-printable";
|
$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
|
// Make the HTML part
|
||||||
$headers["Content-Type"] = "text/html; charset=\"utf-8\"";
|
$headers["Content-Type"] = "text/html; charset=\"utf-8\"";
|
||||||
@ -83,10 +83,10 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
|
|||||||
$htmlContent =
|
$htmlContent =
|
||||||
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n" .
|
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n" .
|
||||||
"<HTML><HEAD>\n" .
|
"<HTML><HEAD>\n" .
|
||||||
"<META http-equiv=Content-Type content=\"text/html; charset=utf-8\">\n" .
|
"<META http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n" .
|
||||||
"<STYLE type=3Dtext/css></STYLE>\n\n".
|
"<STYLE type=\"text/css\"></STYLE>\n\n".
|
||||||
"</HEAD>\n" .
|
"</HEAD>\n" .
|
||||||
"<BODY bgColor=#ffffff>\n" .
|
"<BODY bgColor=\"#ffffff\">\n" .
|
||||||
$htmlContent .
|
$htmlContent .
|
||||||
"\n</BODY>\n" .
|
"\n</BODY>\n" .
|
||||||
"</HTML>";
|
"</HTML>";
|
||||||
|
Loading…
Reference in New Issue
Block a user