Harness the power of MailWizz, the full-featured, self-hosted email marketing software that's been battle-tested since 2013.
With top-notch support, extensive documentation, and a developer-friendly environment, MailWizz integrates seamlessly with a plethora of third-party services like Sendgrid, Amazon SES, and Mailgun.
Interactive OpenAPI documentation with code examples for all endpoints.
npm install node-mailwizz --saveconst config = {
publicKey: "yourPublicKey",
secret: "yourSecretKey",
baseUrl: "https://your-mailwizz-instance.com/api",
timeout: 15000,
userAgent: "LawActive-Mailer/1.0"
};import { ListSubscribers } from "node-mailwizz";
const subscribers = new ListSubscribers(config);
subscribers
.create({
listUid: "YOUR-LIST-ID",
data: {
EMAIL: "user@example.com",
FNAME: "John",
LNAME: "Doe"
}
})
.then(result => console.log("Subscriber created:", result))
.catch(err => console.error("Error:", err));import { TransactionEmail } from "node-mailwizz";
const transactional = new TransactionEmail(config);
transactional
.create({
toName: "John Doe",
toEmail: "john@example.com",
fromName: "My App",
subject: "Welcome!",
body: "<html><body><h1>Welcome!</h1></body></html>",
plainText: "Welcome!",
sendAt: "2024-01-01 10:00:00"
})
.then(result => console.log("Email queued:", result))
.catch(err => console.error("Error:", err));import { Campaigns, CreateCampaignType } from "node-mailwizz";
const campaigns = new Campaigns(config);
campaigns
.create({
name: "My Campaign",
type: CreateCampaignType.REGULAR,
fromName: "John Doe",
fromEmail: "john@example.com",
subject: "Newsletter",
replyTo: "reply@example.com",
sendAt: "2024-01-01 10:00:00",
listId: "YOUR-LIST-ID",
templateId: "YOUR-TEMPLATE-ID"
})
.then(result => console.log("Campaign created:", result))
.catch(err => console.error("Error:", err));| API | Description |
|---|---|
Lists |
Manage mailing lists |
ListSubscribers |
Manage subscribers |
ListFields |
Custom fields for lists |
ListSegments |
Segment management |
Campaigns |
Email campaigns |
CampaignBounces |
Bounce management |
CampaignTracking |
Track opens/clicks |
Templates |
Email templates |
TransactionEmail |
Transactional emails |
Countries |
Countries and zones |
Customers |
Customer management |
Health |
Lightweight ping (read-only) |
For detailed documentation and all available methods, see the API Documentation.
Got an idea or facing an issue? Jump right in with a pull request or spark a discussion with an issue.
A huge shoutout to the brilliant minds behind the evolution of this library:
- ntlzz93: For crafting the original library that started it all.
- chgonzalez9: For helping with the migration to TypeScript.
- kodjunkie: For contributing the unsubscribe method.
This project is licensed under the ISC License - see the LICENSE.md file for details.