0

Requirement is to fetch messages only which have attachments. By making query with has:attachment https://developers.google.com/gmail/api/guides/filtering https://support.google.com/mail/answer/7190?hl=en.I can able to fetch all the message which have attachments but here it returns both inline attachment messages and normal attachment messages. I don't want inline attachment mail. how can i skip inline attachments in the gmail api response.

Is it possible to specify skipping inline attachment messages at the time of querying??. else in the response how to identify inline attachments to skip.

Here content-dispositon indicates inline i don't want to fetch these attachment mails how can i avoid it.

{
    "name": "Content-Description",
    "value": "image002.jpg"
},
{
    "name": "Content-Disposition",
    "value": "inline; filename=\"image002.jpg\"; size=3533; creation-date=\"Fri, 29 Jun 2018 08:18:23 GMT\"; modification-date=\"Fri, 29 Jun 2018 08:18:23 GMT\""
}
  • Please edit your question and include your code and describe the issues you are having with your current solution. – Linda Lawton - DaImTo Jul 02 '18 at 12:13
  • I think inline and attachment (solely as attachment file) is categorized as one, that is why you are getting both when running the query **`has:attachment`**. I wasn't able to find any reported bugs or feature request regarding this issue. But if you like that feature to be available, try filing a [feature request](https://issuetracker.google.com/issues/new?component=191602&template=824107). – Mr.Rebot Jul 03 '18 at 10:09

0 Answers0