I was just going through the new code to see the changes and I noticed this : if($encoding && 0) { //Convert text to desired mime encoding... on line 155 in class.pop3.php
You should remove the "&& 0" to make the new changes work ;)
But I think it would be better just to use this:
if($encoding)
if(!strcasecmp($struct->parameters->attribute,'CHARSET') && strcasecmp($struct->parameters->value,'US-ASCII')) {
$charset=trim($struct->parameters->value);
$text=@iconv($charset,$encoding,$text);
}
}
instead of
if($encoding && 0) { //Convert text to desired mime encoding...
if($struct->parameters
&& !strcasecmp($struct->parameters->attribute,'CHARSET') && strcasecmp($struct->parameters->value,'US-ASCII')) {
$charset=trim($struct->parameters->value);
}
$text=$this->mime_encode($text,$charset,$encoding);
}
It's more generic, it allows decoding from all possible encodings. (I found that mb_decode_string does not always work correctly, so I decided not to use it).
P.S. This is the version I use in a site that has about 500 000 unique visitors a day and about 10 000 000 reloads every day and it's has performed flawlessly (and we have A LOT of feedback). I suggest dropping the mime_encode function and implementing it the easy way I did :)