Reputation: 1145
I'm trying to retrieve and read attachments from my IMAP account via imap_fetchstructure()
but while it reads general attachments such as PDF, Images etc, the specific attachment which I want to read (a name.bin file) doesn't get captured in the code. As you can see in the attached screenshot there is an attachment in the mail.
This is the response I get;
stdClass Object
(
[type] => 3
[encoding] => 3
[ifsubtype] => 1
[subtype] => OCTET-STREAM
[ifdescription] => 0
[ifid] => 0
[bytes] => 58
[ifdisposition] => 0
[ifdparameters] => 0
[ifparameters] => 0
[parameters] => stdClass Object
(
)
)
Upvotes: 0
Views: 553
Reputation: 9675
The sender sent you a 58-byte attachment with content-type application/octet-stream and without such details as a suggested filename, so that's all the information you get from retrieving bodystructure
, which is about the bodystructure, as the name implies. If you want the attachment content, not just its structure, itself you have to retrieve it.
Upvotes: 1