> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/file/_setincludeinmailreport.md).

# \_setIncludeInMailReport

Sets the "attach to email" field.

### Parameters

#### id

The ID of the File being modified.

#### val

Integer value which decides if the "attach to email" field is enabled:\
0 => disabled\
1 => enabled

### Example

```
FM_api('File_setIncludeInMailReport',[
    'id'=>'427227',
    'val'=>'1'
  ]
);
```

#### On Success

```
{"ok":1}
```

#### On Failure

If the "id" parameter is less than 1 or not given a value:

```
{"error":"missing or invalid parameter: id"}
```
