Skip to content

Commit

Permalink
First attempt at supporting (broken) MS Thread-Index headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Oct 17, 2023
1 parent afb467e commit 96afe59
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/Horde/Mime/Headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ protected function _getHeaderClassName($header)
'Horde_Mime_Headers_MimeVersion',
'Horde_Mime_Headers_Received',
'Horde_Mime_Headers_Subject',
'Horde_Mime_Headers_UserAgent'
'Horde_Mime_Headers_UserAgent',
'Horde_Mime_Headers_ThreadIndex'
);

foreach ($search as $val) {
Expand Down
3 changes: 2 additions & 1 deletion lib/Horde/Mime/Headers/Element/Single.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public static function getHandles()
'importance',
// OTHER: X-Priority
// See: http://kb.mozillazine.org/Emulate_Microsoft_email_clients
'x-priority'
'x-priority',
'thread-index'
);
}

Expand Down
22 changes: 22 additions & 0 deletions lib/Horde/Mime/Headers/ThreadIndex.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
*
*/
class Horde_Mime_Headers_ThreadIndex extends Horde_Mime_Headers_Element_Single
{
public static getHandlers()
{
return array(
'thread-index'
);
}
/**
* TODO
*/
protected function _sendEncode($opts)
{
return array(Horde_Mime::encode($this->values, $opts['charset']));
}
}

0 comments on commit 96afe59

Please sign in to comment.