Send with fetch
Send emails without the npm package, straight against the REST API with an API key.
If the npm package isn't available, you can send directly against the REST API.
The endpoint expects multipart/form-data and an API key in the x-api-key
header.
Endpoint
Example
A private API key belongs on the server only; a public key may be
used in the frontend. Do not set Content-Type manually: with
FormData the browser adds the correct multipart/form-data boundary
automatically.
Optional fields: body (inline content) and file (attachment). See
Email parameters.