@gigamusic/email
v3.0.0
Published
Email abstraction + HTML templates for gigamusic. Resend and Brevo drivers, branding-parameterized templates.
Readme
@gigamusic/email
Transactional email abstraction for the gigamusic platform. Ships an EmailProvider interface, two interchangeable drivers (Resend, Brevo), and branding-parameterized HTML templates for purchase confirmation, order lookup, and contact-form emails.
Consumers pick a driver at app boot:
import {
createResendProvider,
renderPurchaseConfirmation,
} from "@gigamusic/email";
const provider = createResendProvider({ apiKey: RESEND_API_KEY });
const { subject, html } = renderPurchaseConfirmation({
branding: { siteName: "My Artist", themeColor: "#ff00aa" },
verifyUrl: "https://example.com/orders?token=...",
itemNames: ["Album One"],
totalCents: 1500,
});
await provider.send({ from, to, subject, html });No process.env reads — secrets flow in via factory args.
