import { ByteSend } from "bytesend-js";const bytesend = new ByteSend(process.env.BYTESEND_API_KEY!);const email = await bytesend.emails.send({ from: "[email protected]", to: "[email protected]", subject: "Hello from ByteSend", html: "<p>This email was sent via the ByteSend SDK.</p>", text: "This email was sent via the ByteSend SDK.",});console.log("Sent:", email.id);
Store your API key in an environment variable, not in version control: