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

https://github.com/zweifisch/mumail

send mail in mustache
https://github.com/zweifisch/mumail

Last synced: about 2 months ago
JSON representation

send mail in mustache

Awesome Lists containing this project

README

        

# mumail

[![NPM Version][npm-image]][npm-url]

send mail in mustache

## usage

```sh
npm install mumail
```

```coffeescript
Mumail = require 'mumail'

mumail = new Mumail
templatePath: "#{__dirname}/templates/"
from: 'noreply@localhost'
transport:
host: 'smtp.test.com'
port: 465
auth:
user: "username"
pass: "password"
secure: yes

mumail.send
to: "[email protected]"
subject: "Welcome!"
template: "welcome"
data:
username: 'unique-username'
.then ->
console.log "sent"
```

`welcome.html` located in `./templates`

```html


welcome {{username}}

```

[npm-image]: https://img.shields.io/npm/v/mumail.svg?style=flat
[npm-url]: https://npmjs.org/package/mumail