Bug 1606552 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I'm trying to use the `browser.messages.getFull` API to get the bodies of attachments so that I can display them.

When I use this API, I'm only getting the body for the main email, not the attachments as well.

For example, the email I'm looking at at the moment has this rough structure:

```
{
  contentType: "message/rfc822",
  parts: [{
    contentType: "multipart/mixed",
    parts: [{
      contentType: "multipart/alternative",
      parts: [{
        contentType: "text/plain",
        body: "Yay, a body!"
      }, {
        contentType: "text/html",
        body: "<html stuff..."
      }]
    }, {
      contentType: "image.jpeg",
      size: 3653748,
      name: "2019.jpg"
    }]
  }]
}
```

As this doesn't have the attachments, there doesn't appear to be any way to get attachment data from the APIs.
I'm trying to use the `browser.messages.getFull` API to get the urls of attachments so that I can display them.

When I use this API, I'm only getting the body for the main email, not the urls for the attachments.

For example, the email I'm looking at at the moment has this rough structure:

```
{
  contentType: "message/rfc822",
  parts: [{
    contentType: "multipart/mixed",
    parts: [{
      contentType: "multipart/alternative",
      parts: [{
        contentType: "text/plain",
        body: "Yay, a body!"
      }, {
        contentType: "text/html",
        body: "<html stuff..."
      }]
    }, {
      contentType: "image.jpeg",
      size: 3653748,
      name: "2019.jpg"
    }]
  }]
}
```

As this doesn't have the attachment urls, there doesn't appear to be any way to get attachment data from the APIs.

Back to Bug 1606552 Comment 0