@mailpace/mailpace.js
v0.1.3
Published
The official Node.js library for the https://mailpace.com API
Downloads
2,248
Readme
MailPace Node.js Library
This is the official Node.js library for the https://mailpace.com transactional email API
Quick Start
Pre-requisites
First you will need to retrieve your API token for your sending domain from MailPace. You can find it under Organization -> Domain -> API Tokens
Your domain must have completed DKIM authorization and have an active plan to send emails.
Installation
If using NPM
npm install --save @mailpace/mailpace.js
If using Yarn
yarn add @mailpace/mailpace.js
Sending an email
const MailPace = require('@mailpace/mailpace.js');
const client = new MailPace.DomainClient('API_TOKEN_HERE');
client
.sendEmail({
from: '[email protected]',
to: '[email protected]',
subject: 'test',
htmlbody: '<H1>HTML Email</h1>',
})
.then((r) => {
console.log(r);
});
Documentation
See the ./docs folder for documentation and options
To regenerate the documentation, run yarn docs:md
Issues, Support & Contributions
If you have any difficulties please contact [email protected] or open an issue on github.
Contributions are always welcome
License
MIT