# Set PAW Mail Attachment

Programmatically creates a mail attachment and adds it to the existing attachment list. Used to pass attachments to the SendMail/ReplyMail/ForwardMail activities.


---

### :arrow_left:**INPUT**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `FileName` | `String` | ✅Yes     | File name   |
| `Data`    | `Byte[]` | ✅Yes     | File data   |
| `AddTo`   | `List<PAWMailAttachment>` | ❌No      | Existing list to add to (a new list is created if null) |


---

### :arrow_right:**OUTPUT**

| Parameter | Type | Description |
|-----------|------|-------------|
| `IsSetPAWMailAttachmentSuccessful` | `Boolean` | Whether the operation succeeded |
| `SetPAWMailAttachmentMessage` | `String` | Result/error message |
| `PAWMailAttachmentResult` | `List<PAWMailAttachment>` | Updated attachment list |


---

### :arrow_down:**MISC**

| **Parameter** | **Type** | **Default** | **Description** |
|-----------|------|---------|-------------|
| `ThrowException` | `Boolean` | ❌No     | Throw exception on error |