From dc9d750e18bafb71776921ce6fac0c4e8bff994d Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 20 May 2010 04:34:17 -0400
Subject: [PATCH] - Fix message/rfc822 attachments encoding in sent mail
---
program/steps/mail/sendmail.inc | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index aed7af9..e7f5b95 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -466,7 +466,7 @@
if ($isHtml && (preg_match($dispurl, $message_body) > 0)) {
$message_body = preg_replace($dispurl, ' src="'.$attachment['name'].'" ', $message_body);
$MAIL_MIME->setHTMLBody($message_body);
-
+
if ($attachment['data'])
$MAIL_MIME->addHTMLImage($attachment['data'], $attachment['mimetype'], $attachment['name'], false);
else
@@ -481,9 +481,7 @@
$ctype,
$attachment['name'],
($attachment['data'] ? false : true),
- // @TODO: quoted-printable for message/rfc822 is safe,
- // but we should check that 7bit or 8bit is possible here
- ($ctype == 'message/rfc822' ? 'quoted-printable' : 'base64'),
+ ($ctype == 'message/rfc822' ? '8bit' : 'base64'),
($ctype == 'message/rfc822' ? 'inline' : 'attachment'),
$message_charset, '', '',
$CONFIG['mime_param_folding'] ? 'quoted-printable' : NULL,
--
Gitblit v1.9.1