54 lines
6.5 KiB
JSON
54 lines
6.5 KiB
JSON
{
|
|
"name": "emailjs",
|
|
"description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server",
|
|
"version": "0.3.4",
|
|
"author": {
|
|
"name": "eleith"
|
|
},
|
|
"contributors": [
|
|
{
|
|
"name": "izuzak"
|
|
},
|
|
{
|
|
"name": "Hiverness"
|
|
},
|
|
{
|
|
"name": "mscdex"
|
|
},
|
|
{
|
|
"name": "jimmybergman"
|
|
}
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "http://github.com/eleith/emailjs.git"
|
|
},
|
|
"dependencies": {
|
|
"moment": "= 1.7.0",
|
|
"bufferjs": "=1.1.0"
|
|
},
|
|
"optionalDependencies": {
|
|
"bufferjs": "=1.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"mocha": "= 1.7.4",
|
|
"chai": "= 1.1.0",
|
|
"simplesmtp": "= 0.1.18",
|
|
"mailparser": "0.2.27",
|
|
"iconv": "1.1.3"
|
|
},
|
|
"engine": [
|
|
"node >= 0.6"
|
|
],
|
|
"main": "email",
|
|
"scripts": {
|
|
"test": "mocha -R spec -t 5000"
|
|
},
|
|
"readme": "# emailjs (v0.3.3) [![Build Status](https://secure.travis-ci.org/eleith/emailjs.png)](http://travis-ci.org/eleith/emailjs)\n\nsend emails, html and attachments (files, streams and strings) from node.js to any smtp server\n\n## INSTALLING\n\n\tnpm install emailjs\n\n## FEATURES\n - works with SSL and TLS smtp servers (ex: gmail)\n - supports smtp authentication (PLAIN, LOGIN, CRAMMD5)\n - emails are queued and the queue is sent asynchronously\n - supports sending html emails and emails with multiple attachments (MIME)\n - attachments can be added as strings, streams or file paths\n - works with nodejs 3.8 and above\n\n## REQUIRES\n - access to an SMTP Server (ex: gmail)\n\n## EXAMPLE USAGE - text only emails\n\n```javascript\nvar email \t= require(\"./path/to/emailjs/email\");\nvar server \t= email.server.connect({\n user: \"username\", \n password:\"password\", \n host: \"smtp.gmail.com\", \n ssl: true\n \n});\n\n// send the message and get a callback with an error or details of the message that was sent\nserver.send({\n text: \"i hope this works\", \n from: \"you <username@gmail.com>\", \n to: \"someone <someone@gmail.com>, another <another@gmail.com>\",\n cc: \"else <else@gmail.com>\",\n subject: \"testing emailjs\"\n}, function(err, message) { console.log(err || message); });\n```\n\n## EXAMPLE USAGE - html emails and attachments\n\n```javascript\nvar email \t= require(\"./path/to/emailjs/email\");\nvar server \t= email.server.connect({\n user:\t\"username\", \n password:\"password\", \n host:\t\"smtp.gmail.com\", \n ssl:\t\ttrue\n});\n\nvar message\t= {\n text:\t\"i hope this works\", \n from:\t\"you <username@gmail.com>\", \n to:\t\t\"someone <someone@gmail.com>, another <another@gmail.com>\",\n cc:\t\t\"else <else@gmail.com>\",\n subject:\t\"testing emailjs\",\n attachment: \n [\n {data:\"<html>i <i>hope</i> this works!</html>\", alternative:true},\n {path:\"path/to/file.zip\", type:\"application/zip\", name:\"renamed.zip\"}\n ]\n};\n\n// send the message and get a callback with an error or details of the message that was sent\nserver.send(message, function(err, message) { console.log(err || message); });\n\n// you can continue to send more messages with successive calls to 'server.send', \n// they will be queued on the same smtp connection\n\n// or you can create a new server connection with 'email.server.connect' \n// to asynchronously send individual emails instead of a queue\n```\n# API \n\n## email.server.connect(options)\n\n\t// options is an object with the following keys\n\toptions =\n\t{\n\t\tuser \t\t// username for logging into smtp \n\t\tpassword // password for logging into smtp\n\t\thost\t\t// smtp host\n\t\tport\t\t// smtp port (if null a standard port number will be used)\n\t\tssl\t\t// boolean or object {key, ca, cert} (if exists, ssl connection will be made)\n\t\ttls\t\t// boolean (if true, starttls will be initiated)\n\t\ttimeout\t// max number of milliseconds to wait for smtp responses (defaults to 5000)\n\t\tdomain\t// domain to greet smtp with (defaults to os.hostname)\n\t}\n\t\n## email.server.send(message, callback)\n\t\n\t// message can be a smtp.Message (as returned by email.message.create)\n\t// or an object identical to the first argument accepted by email.message.create\n\n\t// callback will be executed with (err, message)\n\t// either when message is sent or an error has occurred\n\n## message\n\n\t// headers is an object ('from' and 'to' are required)\n\t// returns a Message object\n\n\t// you can actually pass more message headers than listed, the below are just the\n\t// most common ones you would want to use\n\n\theaders =\n\t{\n\t\ttext\t\t// text of the email \n\t\tfrom\t\t// sender of the format (address or name <address> or \"name\" <address>)\n\t\tto\t\t\t// recipients (same format as above), multiple recipients are separated by a comma\n\t\tcc\t\t\t// carbon copied recipients (same format as above)\n\t\tbcc\t\t// blind carbon copied recipients (same format as above)\n\t\tsubject\t// string subject of the email\n attachment // one attachment or array of attachments\n\t}\n\n## attachment\n\n\t// can be called multiple times, each adding a new attachment\n\t// options is an object with the following possible keys:\n \n options =\n {\n // one of these fields is required\n path // string to where the file is located\n data // string of the data you want to attach\n stream // binary stream that will provide attachment data (make sure it is in the paused state)\n // better performance for binary streams is achieved if buffer.length % (76*6) == 0\n // current max size of buffer must be no larger than Message.BUFFERSIZE\n \n // optionally these fields are also accepted\n type\t // string of the file mime type\n name // name to give the file as perceived by the recipient\n alternative // if true, will be attached inline as an alternative (also defaults type='text/html')\n inline // if true, will be attached inline\n encoded // set this to true if the data is already base64 encoded, (avoid this if possible)\n headers // object containing header=>value pairs for inclusion in this attachment's header\n related // an array of attachments that you want to be related to the parent attachment\n }\n\t\n## Authors\n\neleith\n\n## Testing\n\n\tnpm install -d\n\tnpm test\n\n## Contributions\n\nissues and pull requests are welcome\n",
|
|
"readmeFilename": "Readme.md",
|
|
"_id": "emailjs@0.3.4",
|
|
"dist": {
|
|
"shasum": "a4d7fef2903043c982d281b6272672b0c45b68f5"
|
|
},
|
|
"_from": "emailjs@>= 0.2.7"
|
|
}
|