PHP电子邮件正文解码为纯文本 [英] Php email body decoding to plain
问题描述
我要用php提取一些相等的电子邮件的内容,但我不能.
I'm tying extract some content of some equal emails with php but I can't.
有了这个:
$body = imap_body($imap_o, $email_n);
我得到:
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:
但是有很多= *我知道= 20及其空格,但是这里还有其他我不知道是什么意思.
but there are lot of =* I know that =20 its and space, but here there are others that I don't know what mean.
如果我添加quoted_printable_decode():
If I add quoted_printable_decode():
$body = quoted_printable_decode($body);
我得到:
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�:
我添加了imap_qprint()和utf8_decode,但没有任何改善...
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));
这篇关于PHP电子邮件正文解码为纯文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!