# downloadAttachment

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.
