added an implementation of imap_mime_header_decode() using Horde_Mime::decode() with which mail app now seems to work without PHP imap extension

This commit is contained in:
Ralf Becker 2014-04-19 09:22:59 +00:00
parent 54dc648b18
commit f2030c4746

View File

@ -159,6 +159,26 @@ if (!function_exists('imap_rfc822_write_address'))
}
}
if (!function_exists('imap_mime_header_decode'))
{
/**
* Decodes MIME message header extensions that are non ASCII text (RFC2047)
*
* Uses Horde_Mime::decode() and therefore always returns only a single array element!
*
* @param string $text
* @return array with single object with attribute text already in our internal encoding and charset
* @deprecated use Horde_Mime::decode()
*/
function imap_mime_header_decode($text)
{
return array((object)array(
'text' => Horde_Mime::decode($text),
'charset' => translation::charset(), // is already in our internal encoding!
));
}
}
if (!function_exists('mb_strlen'))
{
/**