PHP Classes

quoted-printable email decoding issue

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  quoted-printable email decoding issue  >  (Un) Subscribe thread alerts  
Subject:quoted-printable email decoding issue
Summary:Unable to decode certain emails.
Author:Michael Dale
Date:2012-08-29 11:05:03
Update:2012-08-29 11:34:02

  1. quoted-printable email decoding issue   Reply   Report abuse  
Michael Dale - 2012-08-29 11:05:03

I am using your great mime_parser.php and pop3 class.

When downloading emails with quoted-printable content encoding (i.e using =92) and inserting it into the mysql database the email is getting cut off.

My system is running UTF-8

The following function seems to help:

function decode_qprint($str) {
$str = quoted_printable_decode($str);
$str = iconv('ISO-8859-2', 'UTF-8', $str);
return $str;

But I only want it to process emails with quoted-printable.

Any ideas or pointers?

Many thanks.

  2. Re: quoted-printable email decoding issue   Reply   Report abuse  
Manuel Lemos - 2012-08-29 11:34:03 - In reply to message 1 from Michael Dale
The class already decodes encoded headers. You do not need to decode them. Look at the DecodedHeaders entry.