> For the complete documentation index, see [llms.txt](https://wiki.4thtech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.4thtech.io/sdk-and-white-label/ethereum/mail/downloadattachment.md).

# downloadAttachment

{% hint style="info" %}
Reference for SDK 0.5.x (maintenance mode). See [Status](/sdk-and-white-label/status.md).
{% endhint %}

Downloads an attachment of a specific mail.

### Usage

```ts
const attachment = receivedEnvelope.content.attachments[0];
const fileBuffer = await mail.downloadAttachment(attachment);
```

### Returns

`Promise<ArrayBuffer>`

A promise that resolves to an array buffer of the downloaded file.

### Parameters

#### attachment

* **Type** `RemoteFileInfo`

The information about the attachment that needs to be downloaded.
