From 9ab4f7cf30d3a94fee08fe00b4a2d17063ea7b38 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 8 Sep 2010 12:56:29 -0600 Subject: [PATCH] Use transfer encoding in MIME part if specifically set For types other than multipart (which is always 7bit) and text (which is handled separately), use the transfer encoding given if it is different than the default. --- framework/Mime/lib/Horde/Mime/Part.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index 5b38b803d..3feba8b33 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -1187,9 +1187,15 @@ class Horde_Mime_Part break; default: - $encoding = ($encode & self::ENCODE_8BIT || $encode & self::ENCODE_BINARY) - ? '8bit' - : 'base64'; + /* If transfer encoding has changed from the default, use that + * value. */ + if ($this->_transferEncoding != self::DEFAULT_ENCODING) { + $encoding = $this->_transferEncoding; + } else { + $encoding = ($encode & self::ENCODE_8BIT || $encode & self::ENCODE_BINARY) + ? '8bit' + : 'base64'; + } break; } -- 2.11.0