EmilTholin / gmail-api-parse-message

Parses the response from the Gmail API's GET message method
MIT License
45 stars 19 forks source link

Attachment message/rfc822 #11

Open Logan-Yao opened 1 year ago

Logan-Yao commented 1 year ago

Hello,

It seems the parseMessage returns wrong result when a .eml file (mimeType: message/rfc822) was attached. The attachment might be parsed as email too, and the result from .eml overwrite the original result.

Is there any solution?

Thanks, Logan

Liz-Lovelace commented 1 year ago

I've just encountered the same issue. For me, removing one of the parts from the gmail result object worked:

messageData.data.payload.parts.pop();

This works for this one email, but I'm not sure this is a particularly good workaround.