Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pierreco/mailgunnodemailer

NodeMailer + Mailgun + jade template
https://github.com/pierreco/mailgunnodemailer

Last synced: about 1 month ago
JSON representation

NodeMailer + Mailgun + jade template

Awesome Lists containing this project

README

        

##NodeMailer + Mailgun + jade template

####Installation
```
$ npm install
```

####Configuration
Open [https://mailgun.com/app/domains](https://mailgun.com/app/domains)

Copy ```Domain name``` and ```API Key``` in config.js

####Test
```
$ node demo/test.js
```

#####Example
```javascript
var Sender = require('../sender');

var billingInfo = {
receiverEmail: '[email protected]',
senderEmail : '[email protected]',
subject : 'Billing e.g. invoices and receipts',
receiverName: {
first: 'Pierre',
last: 'Cordier'
},
date:'June 01 2016',
billing : {
ref: '#1234',
total : '33.98',
service1 :{
price: '19.99'
},
service2 :{
price: '9.99'
},
service3 :{
price: '4.00'
}
}
}

Sender.sendEmail('billing', billingInfo);
```

####Sources
[Mailgun.com](https://mailgun.com/)

[Node Email Templates](https://github.com/niftylettuce/node-email-templates)

[Transactional Email Templates](https://github.com/mailgun/transactional-email-templates/)

[Nodemailer](https://github.com/andris9/Nodemailer/)

[Nodemailer Mailgun Transport](https://github.com/orliesaurus/nodemailer-mailgun-transport)