We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
// index.js /** * External Modules */ const express = require("express"); const NotifyClient = require("notifications-node-client").NotifyClient; /** * App Variables */ const app = express(); const port = "8000"; const notifyClient = new NotifyClient( "https://api.staging.notification.cdssandbox.xyz/", process.env.NOTIFY_API_KEY ); /** * Routes */ app.get("/", (req, res) => { notifyClient .sendEmail("your colour template id", "your email address", { personalisation: { colour: "purple" }, reference: "", }) .then((response) => { console.log("Purple email sent"); res.status(200).send("Purple email sent"); }) .catch((err) => { console.error(err); res.status(500).send("Fail"); }); }); /** * Server Activation */ app.listen(port, () => { console.log(`Listening to requests on http://localhost:${port}`); });