Forum Moderators: coopster
I need to know if there is any way I could output THE WHOLE source of an email into one single string by using IMAP functions.
I'm using imap_fetchheader and imap_fetchbody but information such as attachments' extensions are always missing.
I guess I should use imap_fetchstructure instead, but the documentation being undetailed, I can't produce anything worthable with this function.
Actually, I just need to emulate the "view message source" of Outlook so that the PHP code could detect nasty file extensions such as :
Content-Disposition: attachment;
filename="message.exe"
Thanks for helping! :)
[php.net...]
You can use that command to test for attachments (but it looks tricky, as attachments can be implemented various ways by various sending clients).
Some more code to examine here:
[linuxscope.net...]