Neither imap_headerinfo nor imap_fetchstructure include the blatantly apparent Content-type header in the results [obviously, I’d expect this to be found under imap_headerinfo]. What function can I utilize to get the raw headers so I can parse that header and convert the message body to UTF-8 accordingly?
Neither imap_headerinfo nor imap_fetchstructure include the blatantly apparent Content-type header in the results [obviously,
Share
Of course after I resort to asking a question I figure it out eight minutes later.
The solution is to run
imap_fetchmimeacross the message/part combo like soThis will contain a
Content-typeheader, if available, for each part.