The easiest schema-based type-safe bulk email platform for modern email marketing.
Full TypeScript support with automatic type inference and compile-time safety for your email campaigns.
Define your contact structure once and get automatic validation and type safety across your campaigns.
Built for performance with optimized queue processing and minimal overhead for bulk email sending.
One API. Unlimited emails. Zero headaches.
import { createClient } from "bulk-mailer";
const mailer = createClient({
apiKey: "YOUR_API_KEY",
smtp: {
host: "smtp.gmail.com",
port: 587,
username: "your-email@gmail.com",
password: "your-app-password",
},
schema: {
contacts: {
properties: {
email: { type: "string", required: true, unique: true },
firstName: { type: "string" },
lastName: { type: "string" },
tags: { type: "array" },
},
},
}
});//Create campaign
campaigns.create({
name: "Welcome Series",
subject: "Welcome to our platform!",
template: "<h1>Hello {{firstName}}!</h1>",
})
//Create contact
contacts.create({
email: "user@example.com",
firstName: "John",
lastName: "Doe",
tags: ["newsletter", "premium"]
})