{"_id":"dustmail","_rev":"27-da0c2caa2c536c4471ce1c217cf24bca","name":"dustmail","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"dustmail","version":"0.0.1","author":{"url":"http://getnodecraft.net","name":"NodeCraft Hosting LLC","email":"admin@getnodecraft.net"},"_id":"dustmail@0.0.1","maintainers":[{"name":"nodecraft","email":"admin@getnodecraft.net"}],"homepage":"https://github.com/nodecraft/dustmail.js","bugs":{"url":"https://github.com/nodecraft/dustmail.js/issues"},"dist":{"shasum":"ca3acbadb95ce303399a78ad67145faa9c9dbf7f","tarball":"https://registry.npmjs.org/dustmail/-/dustmail-0.0.1.tgz","integrity":"sha512-/Q99RQaYBox0dpQKSgV1ZaSk/4C7J+QRvhwVCSLeiZlw0DNrzWzoxylHKquNDJkFe+X2cKjuuUHmI8JMLOAy4w==","signatures":[{"sig":"MEUCIA0xRV9E4mrtw3AvtLIS/IecV6V634n9P12SuLCqz24cAiEAidMUAoa1atPciGmhtig6tnC5LZWzBFiLqs+qC+/2BEw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dustmail.js","_from":".","_shasum":"ca3acbadb95ce303399a78ad67145faa9c9dbf7f","_npmUser":{"name":"nodecraft","email":"admin@getnodecraft.net"},"deprecated":"This package is no longer maintained.","repository":{"url":"https://github.com/nodecraft/dustmail.js.git","type":"git"},"_npmVersion":"1.4.7","description":"Email module powered by Dust templates","directories":{},"dependencies":{"async":"*","underscore":"*","dustjs-linkedin":"*","htmlstrip-native":"0.0.2"}},"0.0.2":{"name":"dustmail","version":"0.0.2","author":{"url":"http://getnodecraft.net","name":"NodeCraft Hosting LLC","email":"admin@getnodecraft.net"},"_id":"dustmail@0.0.2","maintainers":[{"name":"nodecraft","email":"admin@getnodecraft.net"}],"homepage":"https://github.com/nodecraft/dustmail.js","bugs":{"url":"https://github.com/nodecraft/dustmail.js/issues"},"dist":{"shasum":"a5b50c7620de8b112a41dac3ffee7c4e8255706d","tarball":"https://registry.npmjs.org/dustmail/-/dustmail-0.0.2.tgz","integrity":"sha512-O2HDgcEHCtQAyR5msOuQlEWQtsIFRv2q54rJma7ostnep/ZTaHVQT3IJxeEs+FlIZ7X1wfFtsVmqkyQ/HzrqKQ==","signatures":[{"sig":"MEYCIQCTXMAWkerRLr4XQjClJQECgAqe69WXeBI94RyaRIeNPwIhAIKqblPMjAGfEDZRpu/sD6/S2S3rgJE7CW9A2ogiHXiH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dustmail.js","_from":".","_shasum":"a5b50c7620de8b112a41dac3ffee7c4e8255706d","_npmUser":{"name":"nodecraft","email":"admin@getnodecraft.net"},"deprecated":"This package is no longer maintained.","repository":{"url":"https://github.com/nodecraft/dustmail.js.git","type":"git"},"_npmVersion":"1.4.7","description":"Email module powered by Dust templates","directories":{},"dependencies":{"async":"*","underscore":"*","dustjs-linkedin":"*","htmlstrip-native":"0.0.2"}},"0.0.3":{"name":"dustmail","version":"0.0.3","author":{"url":"http://getnodecraft.net","name":"NodeCraft Hosting LLC","email":"admin@getnodecraft.net"},"_id":"dustmail@0.0.3","maintainers":[{"name":"nodecraft","email":"admin@getnodecraft.net"}],"homepage":"https://github.com/nodecraft/dustmail.js","bugs":{"url":"https://github.com/nodecraft/dustmail.js/issues"},"dist":{"shasum":"6a0047e683b1fc789885512f9beba6f356e0f338","tarball":"https://registry.npmjs.org/dustmail/-/dustmail-0.0.3.tgz","integrity":"sha512-Bnkd+X7wOVnfsZlkq7Kq2b3APuQ6/abjnn6Jyud56dihp3uVDQ+PsuE5J5lpeN/NIfuyUYnPtRLwZ7wulHR6ow==","signatures":[{"sig":"MEUCIQDq4m0OVLNC/5dWPnl+zytSajchxmBV+LrH6bDHRnrH2wIgFB53XIjbIL3QMkupqRDlGKIdA1rro52Fll2rgSfZWaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dustmail.js","_from":".","_shasum":"6a0047e683b1fc789885512f9beba6f356e0f338","_npmUser":{"name":"nodecraft","email":"admin@getnodecraft.net"},"deprecated":"This package is no longer maintained.","repository":{"url":"https://github.com/nodecraft/dustmail.js.git","type":"git"},"_npmVersion":"1.4.7","description":"Email module powered by Dust templates","directories":{},"dependencies":{"async":"*","underscore":"*","dustjs-linkedin":"*","htmlstrip-native":"0.0.2"}}},"time":{"created":"2014-05-19T19:21:46.408Z","modified":"2025-11-30T15:26:46.545Z","0.0.1":"2014-05-19T19:21:46.408Z","0.0.2":"2014-05-19T19:44:17.108Z","0.0.3":"2014-06-12T13:45:13.943Z"},"bugs":{"url":"https://github.com/nodecraft/dustmail.js/issues"},"author":{"url":"http://getnodecraft.net","name":"NodeCraft Hosting LLC","email":"admin@getnodecraft.net"},"homepage":"https://github.com/nodecraft/dustmail.js","repository":{"url":"https://github.com/nodecraft/dustmail.js.git","type":"git"},"description":"Email module powered by Dust templates","maintainers":[{"email":"jon@nodecraft.com","name":"blazedd"},{"email":"james+npm@jross.me","name":"cherryjimbo"},{"email":"matthew.a@nodecraft.com","name":"matthew.a"}],"readme":"dustmail.js\n=====\n\n    npm install dustmail\n\n\nDustmail is a simple email module designed to leverage dust templates for sending emails out. This module allows you to create templates like many developers have grown to expect with an express server, complete with layouts and partials.\n\nDustmail is also designed to allow you to use whatever email sending server you are most comfortable with by providing a simple and easy to use driver system. We've included two drivers for popular mail services Postmark and Mandrill. Both drivers are separate from Dustmail and can be installed via npm.\n\n\nCode Examples\n-------------\n```javascript\nvar\tdustmail = require('dustmail')({\n\t\tlayouts_dir: './example_templates/layouts/',\n\t\tpartials_dir: './example_templates/partials/',\n\t\ttemplates_dir: './example_templates/templates/',\n\t\tdriver: require('dustmail-postmark')('key') // you can also specify your driver when initialising dustmail\n\t}),\n\tfs = require('fs'); // only necessary for reading file for attachment example\n\nvar data = {\n\ttemplate: 'layout_example',\n\tvars: {\n       name: 'Mr. Example'\n   },\n   to: 'example@example.com',\n   from: 'example@example.com',\n   subject: 'Dustmail is awesome!',\n\tattachments: [ // array of objects\n\t\t{\n\t\t\tname: 'readme.txt',\n\t\t\tcontent: fs.readFileSync('./README.md'), // full content of the file\n\t\t\tcontentType: 'text/plain'\n\t\t}\n\t]\n}\n\n// This example demos use of rendering template first, and passing that directly to send.\n// This could allow you to use the generated HTML/Plaintext to save or manipulate further as you choose.\ndustmail.render(data.template, data.vars, function(err, renderData){\n\tif(err){\n\t\tres.fail(err);\n\t}else{\n\t\tdustmail.send({\n\t\t\tto: data.to,\n\t\t\tfrom: data.from,\n\t\t\tsubject: data.subject,\n\t\t\tattachments: data.attachments,\n\t\t\trender: renderData,\n\t\t\tsendType: 'html',\n\t\t}, function(err, data){\n\t\t\tif(err){\n\t\t\t\tconsole.log(err);\n\t\t\t}else{\n\t\t\t\tconsole.log(data);\n\t\t\t}\n\t\t});\n\t}\n});\n\n// This example simply sends an email using the template and variables specified.\n// Rendering the template HTML/Plaintext is handled internally.\ndustmail.send({\n\tto: data.to,\n\tfrom: data.from,\n\tsubject: data.subject,\n\tattachments: data.attachments,\n\ttemplate: data.template,\n\tvars: data.vars,\n\tsendType: 'text',\n}, function(err, data){\n\tif(err){\n\t\tconsole.log(err);\n\t}else{\n\t\tconsole.log(data);\n\t}\n});\n```\nErrors\n------\nErrors are returned in the following format. 'raw' is not included where not applicable.\n```javascript\n{\n\tmessage: 'simple message',\n\traw: 'raw, technical message'\n}\n```\nDrivers\n-------\nWriting an email driver for dustmail.js is extremely simple. The driver is just a basic function to handle the email being sent. See [our documentation](https://github.com/nodecraft/dustmail.js/wiki/Creating-a-dustmail-driver) for more information on writing your own.\n","readmeFilename":"README.md","users":{"jitendravyas":true}}