Php email body decoding to plain


I’m tying extract some content of some equal emails with php but I can’t.

With that:

$body = imap_body($imap_o, $email_n);

I get:

Pour = le r=E9cup=E9rer, il suffit de le t=E9l=E9charger, de le r=E9ceptionner puis de    l=92ouvrir.=Une f= ois votre traduction termin=E9e, n=92oubliez pas de sauvegarder vos paires de langues et d=92effectuer une v=E9rification g=E9n=E9rale (statuts des segments, b= alises, nombres, espaces, majuscules, etc.).Ensui= te, cliquez sur =AB=A0Terminer et livrer=A0=BB.Voici le r=E9capitulatif du projet=A0:

but there are lot of =* I know that =20 its and space, but here there are others that I don’t know what mean.

If I add quoted_printable_decode():

$body = quoted_printable_decode($body);

I get:

Pour le r�cup�rer, il suffit de le t�l�charger, de le r�ceptionner puis de l�ouvrir. Une fois votre traduction termin�e, n�oubliez pas de sauvegarder vos paires de langues et d�effectuer une v�rification g�n�rale (statuts des segments, balises, nombres, espaces, majuscules, etc.). Ensuite, cliquez sur ��Terminer et livrer��. Voici le r�capitulatif du projet�:

I added imap_qprint() and utf8_decode and nothing improve…

Before decode that messages I need to send a “clean” copy of those, without some information, and if I can get those on plain format it will help me to do it much faster and easier.

And If i need to delete some words of the body how can I do?



$body = utf8_encode(quoted_printable_decode($body));

Answered By – Musa

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published