mumail

sending mail using sendmail, using mustache for templating

npm install mumail
6 downloads in the last week
6 downloads in the last month

mumail

sending email using sendmail, using mustache for templating

usage

npm install mumail
Mumail = require 'mumail'

mumail = new Mumail
    templatePath: './templates/'
    from: 'noreply@localhost'

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>
npm loves you