Apple mail sends messages that are multipart/mixed, with the first part being a text part, and the second part being a multipart/related part that has an HTML and all the attached images inside.
mimeparser currently picks only the first image, second and third images are lost.
For context: we got a message with 3 images via https://github.com/deltachat-bot/team-bot and only received one image in the end.
HTML part has references to images, but they look like <img src="blob:applewebdata://" ..> and are not really usable. Thunderbird cannot display them, but displays all three attached images as attachments. See https://learn.microsoft.com/en-us/answers/questions/1662096/applewebdata-in-email-from-ios-exchange-app for an example. Maybe it is a bug resulting from some copy-paste of HTML. Also found https://apple.stackexchange.com/questions/292846/what-is-applewebdata-and-how-do-i-avoid-it, but not much related info about why this happens.
In any case, for the bot we want to somehow get all images so they can be forwarded.
There is a related test that was added in PR #2272
This is where the code dropping the images comes from. There the message has proper cid: image references so images are likely accessible via HTML. We need to somehow distinguish between the cases, likely by dropping the images only if they have cid
Apple mail sends messages that are
multipart/mixed, with the first part being a text part, and the second part being amultipart/relatedpart that has an HTML and all the attached images inside.mimeparsercurrently picks only the first image, second and third images are lost.For context: we got a message with 3 images via https://github.com/deltachat-bot/team-bot and only received one image in the end.
HTML part has references to images, but they look like
<img src="blob:applewebdata://" ..>and are not really usable. Thunderbird cannot display them, but displays all three attached images as attachments. See https://learn.microsoft.com/en-us/answers/questions/1662096/applewebdata-in-email-from-ios-exchange-app for an example. Maybe it is a bug resulting from some copy-paste of HTML. Also found https://apple.stackexchange.com/questions/292846/what-is-applewebdata-and-how-do-i-avoid-it, but not much related info about why this happens.In any case, for the bot we want to somehow get all images so they can be forwarded.
There is a related test that was added in PR #2272
This is where the code dropping the images comes from. There the message has proper
cid:image references so images are likely accessible via HTML. We need to somehow distinguish between the cases, likely by dropping the images only if they havecid