anicholson / obsidian-google-mail

Fetch emails to Obsidian (as markdown) from Gmail server
55 stars 4 forks source link

Support some more attachment-related edge cases #32

Closed dotnich-io closed 6 months ago

dotnich-io commented 9 months ago

Some emails were refusing to fetch for me, resulting in the same error as #30 .

Debugging this, I discovered the affected messages had a MIME type of multipart/mixed, which was not being picked up by flatten_parts. This in turn resulted in an empty body, which crashed the plugin.

I also noticed that the plugin sometimes misinterpreted empty parts as attachments.

This PR addresses both.