Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
send mail in mustache
CoffeeScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
.gitignore
README.md
mumail.coffee
mumail.js
package.json

README.md

mumail

send mail in mustache

usage

npm install mumail
Mumail = require 'mumail'

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

mumail.on 'done', ->
    console.log 'mail sent'

mumail.on 'error', (error)->
    console.log error

mumail.send
    to: "user@somehost.com"
    subject: "Welcome!"
    template: "welcome"
    data:
        username: 'unique-username'

welcome.html located in ./templates

<html>
    <body>
        welcome {{username}}
    </body>
</html>
Something went wrong with that request. Please try again.