I am using POP3 email piping which works really well unless from field or reply-to in user emails contains country specific chars, i.e. DE umlauts or PL ones. I am running the latest 1.6 + reply_to mod.
The effect is that osTicket cannot decode those fields correctly and this is what appears on the web page in the "name" field: =?UTF-8?Q?Artur_Bombczy=C5=84ski_. However the subject fields are decoded correctly as there are dedicated lines of code that deal with encoding.
The original reply-to header looks like below:
Reply-To: =?UTF-8?Q?Artur_Bombczy=C5=84ski_?=
It looks like that imap_headerinfo() just ignores the fact that from/reply_to fields are encoded and parses it as a text (that is why I see =?UTF-8?Q?Artur_Bombczy=C5=84ski_ in the ticket details).
Does anyone have any clues how to fix it so the from/reply_to is decoded and parsed correctly?
function getHeaderInfo($mid) {
$headerinfo=imap_headerinfo($this->mbox,$mid);
if (isset($headerinfo->reply_to)){
$sender=$headerinfo->reply_to;
} else {
$sender=$headerinfo->from;
}
//Parse what we need...
$header=array(
'from' =>array('name' =>@$sender->personal,'email' =>strtolower($sender->mailbox).'@'.$sender->host),
'subject'=>@$headerinfo->subject,
'mid' =>$headerinfo->message_id);
return $header;
}