forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.66k stars 339 forks source link

xdg-open spawn error #372

Closed paul-gpsit closed 5 years ago

paul-gpsit commented 5 years ago

We are using email-templates in an AWS lambda function. The template files are hosted in an S3 bucket. In the lambda, we download the template to a local temp folder in the lambda.

When I try to call the send method, it errors out.

When using v5.0.5, it gives this error object: "error": { "code": "EACCES", "errno": "EACCES", "syscall": "spawn" }

When I tried using v6.0.0, it gave this error: spawn xdg-open ENOENT

The options being passed in are: { "template": "/tmp/0BaZ4XBBo/default-test", "message": { "to": "my@email.address", "subject": "Test", "headers": { "X-SES-CONFIGURATION-SET": "Engagement" }, "ref": [ "a reference" ], "template": "default-test" }, "locals": { "message": { "kpins": [ { "kpin": "1234", "id": "123444" } ] } } }

niftylettuce commented 5 years ago

PR welcome that would fix this, I don't really use nor support Lambda