Skip to content

Commit

Permalink
Re-add the ability to set the broken_rfc2231
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 11, 2014
1 parent 6ccbe58 commit 5f31701
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions framework/Mime/doc/Horde/Mime/UPGRADING
Expand Up @@ -138,6 +138,12 @@ Upgrading to 2.5

These classes were added.

- Horde_Mime_Part

- send()

Added the 'broken_rfc2231' option.


Upgrading to 2.4
================
Expand Down
8 changes: 8 additions & 0 deletions framework/Mime/lib/Horde/Mime/Part.php
Expand Up @@ -1711,9 +1711,16 @@ public function getMetadata($key)
* holding this message's headers.
* @param Horde_Mail_Transport $mailer A Horde_Mail_Transport object.
* @param array $opts Additional options:
* <pre>
* - broken_rfc2231: (boolean) Attempt to work around non-RFC
* 2231-compliant MUAs by generating both a RFC
* 2047-like parameter name and also the correct RFC
* 2231 parameter (@since 2.5.0).
* DEFAULT: false
* - encode: (integer) The encoding to use. A mask of self::ENCODE_*
* values.
* DEFAULT: Auto-determined based on transport driver.
* </pre>
*
* @throws Horde_Mime_Exception
* @throws InvalidArgumentException
Expand Down Expand Up @@ -1784,6 +1791,7 @@ public function send($email, $headers, Horde_Mail_Transport $mailer,
'encode' => $this->getHeaderCharset(),
'idn' => true
)), $headers->toArray(array(
'broken_rfc2231' => !empty($opts['broken_rfc2231']),
'canonical' => $canonical,
'charset' => $this->getHeaderCharset()
)), $msg);
Expand Down
4 changes: 3 additions & 1 deletion imp/lib/Compose.php
Expand Up @@ -1184,7 +1184,9 @@ public function sendMessage(Horde_Mail_Rfc822_List $email,
{
$email = $this->_prepSendMessage($email, $message);

$opts = array();
$opts = array(
'broken_rfc2231' => true
);
if ($this->getMetadata('encrypt_sign')) {
/* Signing requires that the body not be altered in transport. */
$opts['encode'] = Horde_Mime_Part::ENCODE_7BIT;
Expand Down

0 comments on commit 5f31701

Please sign in to comment.