zaagel
v0.2.4
Published
send emails anywhere in 2 lines of code
Downloads
3
Maintainers
Readme
Send templated emails from anywhere to everywhere in 2 lines of code.
Installation
npm i zaagel
Usage
let's say i have this piece of data
const data = {
name: 'foo',
decription: 'bar',
message: 'foo bar never gets old',
}
THIS is how easy it is to send it as a templated email with zaagel
const message = {
to: "[email protected]",
subject: "Sending automated emails is easy!",
template: "message-confirmation", // email template used
body: data, // data to populate template,
replyTo: "[email protected]",
}
import zaagel from 'zaagel'
zaagel.mail(message)
By default, emails are sent from [email protected].
If you need to override the default behavior, or want further customization, you can pass in your own SMTP settings to the configure function before making a mailing request.
const siteData = {
siteName: 'your-site.com',
siteOwner: 'your-name',
siteEmail: '[email protected]'
}
const config = {
service: "Outlook365", // or gmail, zoho, etc.
host: "smtp.office365.com",
port: "587",
tls: {
ciphers: "SSLv3",
rejectUnauthorized: false,
},
auth: {
user: '[email protected]',
pass: 'your-app-password',
},
}
import zaagel from 'zaagel'
zaagel.configure(siteData, config)
Contributing
Here's where this project is headed:
Near Future:
🎁 Templates documentation
🎁 API documentation
🎁 More email templates
🎁
Later:
🤯 Email scheduling (send at time t)
🤯 Visual email editor
🤯 Dashboard to track email performance
Contributing to any of these would be major!!
License
Zaagel is licensed under the MIT license