php-imap
php-imap copied to clipboard
Fetching inline attachment within messages forwarded as attachment
Hello, I'm experiencing this issue while fetching a range of messages from my email inbox. When parsing a message that has been forwarded to me as attachment, I can only download the single .eml attachment, while I would also like to download the attachments to the original message. The behaviour itself isn't wrong (the message delivered to my inbox does really contain one single attachment), but it's poor compared to what other email clients do, including Thunderbird and Gmail web app, since they do list all the attachments contained in the .eml message. I tried and read through the api docs, but cannot find anything related to this situation.
You might replicate this scenario quite easily, just forward as attachment a message with one ore more attachments to your email and parse this message attachments with Message::getAttachments().
tested on php-imap 4.1.2.
Hi @sonicrocket,
Thanks a lot for reporting this issue. I really appreciate it! However, in order to help you out, it would be great if you could provide an anonymized version of the problematic message. Without that, it's quite tough for me to debug the issue accurately.
Since you're using an older version of the library, I recommend updating to the latest version and giving it another shot. There's a chance that the problem might have already been fixed in the newer release.
Once again, thanks for taking the time and effort to make this library better! If you have any more questions or need further assistance, feel free to let me know.
Best regards and happy coding!
Hello, you don't need a specific message. You can replicate it by sending yourself AS AN ATTACHMENT a dummy message containing one or more attachments.