https://github.com/tschoffelen/macaw
🦜 Scalable email templates for Node.js applications.
https://github.com/tschoffelen/macaw
email nodejs templates
Last synced: about 1 month ago
JSON representation
🦜 Scalable email templates for Node.js applications.
- Host: GitHub
- URL: https://github.com/tschoffelen/macaw
- Owner: tschoffelen
- License: mit
- Created: 2020-02-14T21:37:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T17:37:43.000Z (over 1 year ago)
- Last Synced: 2025-04-17T00:41:54.526Z (about 1 month ago)
- Topics: email, nodejs, templates
- Language: JavaScript
- Homepage: https://includable.com/macaw/
- Size: 12.3 MB
- Stars: 26
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scalable email templates for node.js
[](https://travis-ci.com/macaw-email/macaw)
[](https://codecov.io/gh/macaw-email/macaw)
[](https://npmjs.org/macaw)Macaw is a suite of tools that helps you design and send transactional emails. It aims to solve the problems that usually occur at the intersection of design, copywriting and engineering.
**Macaw is:**
- A node.js package that helps you to use templates to send transactions emails
- A CLI tool that helps you structure and preview templates**Macaw is _not_:**
- A Mailchimp-esque drag-and-drop email builder
- A email sending service# Quick example
Some lines of code usually say more than any documentation could, so here's a simple example of how this library could be used:
```js
const macaw = require("macaw");
const sendgrid = require("@macaw-email/provider-sendgrid");const mailer = macaw({
provider: sendgrid({ apiKey: "aaaaa-bbbbbbb-ccccccc-ddddddd" })
});const template = await mailer.template("monthly-newsletter", {
customerName: "Example Business",
greeting: "Hi, Thomas!"
});await template.send({
to: {
name: "Thomas Schoffelen",
email: "[email protected]"
}
});
```# Getting started
Quickly get up and running by executing this command in your project's root directory:
```shell
npx macaw init
```This will:
1. Create a `emails` directory with an example template and layout file.
2. Add `macaw` to your package.json file.Take a look at the files created in the `emails` directory, and use the documentation links below to learn what's next.
# Documentation
- [Templates and layouts](docs/templating.md)
- [Email sending providers](docs/providers.md)
- [Template storage sources](docs/storage.md)
- [Custom provider implementations](docs/custom-provider.md)
- [API classes reference](docs/api.md)
---
Get professional support for this package →
Custom consulting sessions availabe for implementation support and feature development.