Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
既不imap_headerinfo也不在结果中imap_fetchstructure包含明显的Content-type标题[显然,我希望在imap_headerinfo] 下找到它。我可以使用什么函数来获取原始标头,以便我可以解析该标头并将消息正文相应地转换为 UTF-8?
imap_headerinfo
imap_fetchstructure
Content-type
当然,在我提出一个问题后,我在八分钟后弄清楚了。 解决方案是像这样运行imap_fetchmime消息/部分组合
imap_fetchmime
$headers = imap_fetchmime($this->imapStream, $msgNumber, $partNumber);
这将包含Content-type每个部分的标题(如果可用)。