@antistatique/postally
v0.0.1
Published
AiO email creator and delivery system
Downloads
6
Readme
📯 Postally
AiO email creator and delivery system
Prerequisites
Your project need NodeJS 8+.
Postally are using the following libraries to offer an AiO email system :
- Twig.js as the main template engine
- Inky as the Email template engine
- Foundation for Emails as HTML/CSS framework
- Sendgrid to send Email (free account up to 40k/mo)
To help your Email creation process, you can take a look at :
Usage
Then, you can simply use it this way :
const postally = require('@antistatique/postally');
// Email (Twig/Inky) markup
const markup = `
<container>
<row>
<columns align="left">
<h1>Hello {{name}}</h1>
</columns>
</row>
</container>
`;
// Custom and Foundation Email SASS variables
const variables = `
$primary-color: #0ECEE1 !default;
`
// Custom (S)CSS
const styles = `
body { background: $primary-color; }
h1 { font-family: Georgia, serif;}
`
postally({
from: '[email protected]',
to: '[email protected]',
subject: 'Postally is amazing !',
data: { name: 'You' },
markup,
variables,
styles,
sendgrid_api_key: 'XXXXXXXXXXXXX',
}).then((status) => { console.log('Success !', status); });