It is important that your file is sent base64 encoded to the sendmail job and with the _data...base64_ headers removed, otherwise it will be unreadable.
In order to do this, we use a reader to read the file as Data URL
```js
reader.readAsDataURL(file);
```
and then apply to the result so we send only the encoded part without its headers.