You need two things:
- API key — create one in your Reloop account
- Verified domain — add and verify a sending domain; use it in the
fromaddress
For setup details and the full API reference, see reloop.sh/docs.
npm install reloop-emailimport { Reloop } from "reloop-email";
const reloop = new Reloop({ apiKey: "rl_your_api_key_here" });
const { response, error } = await reloop.mail.send({
from: "Reloop <[email protected]>",
to: "[email protected]",
subject: "Welcome to Reloop",
html: "<p>Thanks for signing up.</p>",
text: "Thanks for signing up.",
});
if (error) throw error;
console.log(response.messageId, response.id);More examples and optional fields: reloop.sh/docs
Licensed under the Apache License 2.0 with additional use restrictions from Reloop Labs (same as the Reloop project).