similar to how we do the rest of the mail parsing, decode with
decode_rfc1522 instead of mime_to_perl_string and use try_decode_utf8
otherwise
this is only used for the queue administration api for the user
to view
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
my $res = '';
while (defined(my $line = <$fh>)) {
if ($decode) {
- $res .= mime_to_perl_string($line);
+ $res .= PMG::Utils::decode_rfc1522($line);
} else {
- $res .= $line;
+ $res .= PMG::Utils::try_decode_utf8($line);
}
}