
Klemen - 2025-10-26 14:37:03
Hi,
If the email starts with the UTF-8 byte order mark (BOM; 0xEF, 0xBB, 0xBF) this class does not parse it correctly.
Microsoft 365, for example, when sending an email via POP3, starts the stream with the UTF-8 BOM.
Instead of parsing it, the entire email is detected as "Type: Text" and no headers are processed.
I fixed it temporarily like this:
Find the first instance of:
return($this->SetPHPError('could not read the message file'));
After that code, add:
if(substr($data,0,3)==chr(hexdec('EF')).chr(hexdec('BB')).chr(hexdec('BF'))){
$data = substr($data,3);
}