2013-10-18 99 views
2

我試圖解析電子郵件與IMAP,我得到的消息與imap_fetchbody($conn, $i, 1)這給了我:IMAP電子郵件編碼問題

string(566) " 
The email message addressed to "[email protected]=2E= 
net" with the subject "subject" has been successfully delivered to = 
the destination at 12-Oct-2013 11:01 UTC=2E=20 

This is an automated response=2E Please do not reply to this message=2E Thank you=2E" 

現在,在上述例子中,=2E應該是一個.標題說這個字符集是Windows-1252

我試過iconvmb_convert_encoding但都無法解決這個問題。 在webmail客戶端(roundcube)中查看電子郵件會顯示它應有的樣子,但我似乎無法正確轉換它。

有什麼建議嗎?

+0

這些字符是由url編碼的。解碼它們。 – arkascha

+1

當我繼續搜索時,我在http://www.php.net/manual/en/function.imap-fetchbody.php#111031的註釋中找到'quoted_printable_decode',它解決了這個問題。 – SDekkers

回答