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
- Host: GitHub
- URL: https://github.com/zweifisch/mumail
- Owner: zweifisch
- Created: 2013-03-04T09:47:45.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-04-10T02:23:19.000Z (about 9 years ago)
- Last Synced: 2025-03-12T21:46:28.771Z (2 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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: yesmumail.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