Search code examples
phpemailutf-8asciiimap

How to convert ascii / 7bit email to utf8?


I read e-mails via php imap, and I can convert the header data to utf8.

But some email body is in ascii / 7bit, and I can't convert it.

No change by iconv($row['encode'],'utf-8' ,$row['text']); or mb_convert_encoding($row['text'], $row['encode'], "UTF-8"); and imap_utf8($row['text']); fails.

Do you have any idea to get off the 3D=3D=3D=3D=3D=3D=3D=3D and others from the mail body?


Solution

  • Have a look at quoted_printable_decode, that should help.