aboutsummaryrefslogtreecommitdiffstats
path: root/tools/node_modules/nodemailer/package.json
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/nodemailer/package.json')
-rw-r--r--tools/node_modules/nodemailer/package.json53
1 files changed, 53 insertions, 0 deletions
diff --git a/tools/node_modules/nodemailer/package.json b/tools/node_modules/nodemailer/package.json
new file mode 100644
index 0000000..40f6a43
--- /dev/null
+++ b/tools/node_modules/nodemailer/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "nodemailer",
+ "description": "Easy to use module to send e-mails, supports unicode and SSL/TLS",
+ "version": "0.3.22",
+ "author": {
+ "name": "Andris Reinman"
+ },
+ "maintainers": [
+ {
+ "name": "andris",
+ "email": "andris@node.ee"
+ }
+ ],
+ "homepage": "http://github.com/andris9/nodemailer",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/andris9/nodemailer.git"
+ },
+ "scripts": {
+ "test": "nodeunit test/"
+ },
+ "main": "./lib/nodemailer",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/andris9/nodemailer/blob/master/LICENSE"
+ }
+ ],
+ "dependencies": {
+ "mailcomposer": ">= 0.1.15",
+ "simplesmtp": ">= 0.1.19"
+ },
+ "devDependencies": {
+ "nodeunit": "*"
+ },
+ "engine": {
+ "node": ">=0.4"
+ },
+ "keywords": [
+ "e-mail",
+ "mime",
+ "email",
+ "mail",
+ "sendmail",
+ "ses"
+ ],
+ "readme": "Nodemailer\n==========\n\n**Nodemailer** is an easy to use module to send e-mails with Node.JS (using\nSMTP or sendmail or Amazon SES) and is unicode friendly - You can use any characters you like ✔\n\nNodemailer is Windows friendly, you can install it with *npm* on Windows just like any other module, there are no compiled dependencies. Use it from Azure or from your Windows box hassle free.\n\nVersion v0.3 of Nodemailer is built from scratch and might break some existing scripts, so beware while upgrading. Nodemailer should be backwards compatible - if your script worked before, then it should work now, even if Nodemailer documentation differs from your code (method names, properties etc.).\n\nUse [DocumentUp](http://documentup.com/andris9/nodemailer/) to read this README\nin a more structured way (with TOC).\n\n[![Build Status](https://secure.travis-ci.org/andris9/Nodemailer.png)](http://travis-ci.org/andris9/Nodemailer)\n\n## Nodemailer supports\n\n * **Unicode** to use any characters\n * **HTML content** as well as **plain text** alternative\n * **Attachments** (including attachment **streaming** for sending larger files)\n * **Embedded images** in HTML\n * **SSL/STARTTLS** for secure e-mail delivery\n * Different transport methods - **SMTP**, **sendmail** and **Amazon SES**\n * SMTP **Connection pool** and connection reuse for rapid delivery\n * **Preconfigured** services for using SMTP with Gmail, Hotmail etc.\n * Use objects as header values for **SendGrid** SMTP API\n * **XOAUTH** authentication support and token generation (3-legged OAuth) - useful with Gmail\n * **DKIM** signing\n\n## Support Nodemailer development\n\n[![Donate to author](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DB26KWR2BQX5W)\n\n## Check out my other mail related modules\n\nIf you want to parse generated or received e-mail instead of sending it, check\nout [MailParser](https://github.com/andris9/mailparser).\n\nIf you only want to generate the raw e-mail stream, check out\n[MailComposer](https://github.com/andris9/mailcomposer).\n\nIf you only want to communicate with the SMTP (both as client and the server),\ncheck out [simplesmtp](https://github.com/andris9/simplesmtp).\n\n## Templates\n\nTo use Nodemailer with templates, please see documentation for [node-email-templates](https://github.com/niftylettuce/node-email-templates).\n\n## Example\n\nThis is a complete example to send an e-mail with plaintext and HTML body\n\n```javascript\nvar nodemailer = require(\"nodemailer\");\n\n// create reusable transport method (opens pool of SMTP connections)\nvar smtpTransport = nodemailer.createTransport(\"SMTP\",{\n service: \"Gmail\",\n auth: {\n user: \"gmail.user@gmail.com\",\n pass: \"userpass\"\n }\n});\n\n// setup e-mail data with unicode symbols\nvar mailOptions = {\n from: \"Sender Name ✔ <sender@example.com>\", // sender address\n to: \"receiver1@example.com, receiver2@example.com\", // list of receivers\n subject: \"Hello ✔\", // Subject line\n text: \"Hello world ✔\", // plaintext body\n html: \"<b>Hello world ✔</b>\" // html body\n}\n\n// send mail with defined transport object\nsmtpTransport.sendMail(mailOptions, function(error, response){\n if(error){\n console.log(error);\n }else{\n console.log(\"Message sent: \" + response.message);\n }\n\n // if you don't want to use this transport object anymore, uncomment following line\n //smtpTransport.close(); // shut down the connection pool, no more messages\n});\n```\n\nSee also the [examples folder](https://github.com/andris9/Nodemailer/tree/master/examples)\nfor full featured examples\n\n## Installation\n\nInstall through NPM\n\n```\nnpm install nodemailer\n```\n\n## Usage\n\nInclude the module\n\n```javascript\nvar nodemailer = require(\"nodemailer\");\n```\n\nAn e-mail can be sent with `sendMail(mailOptions[, callback])` command\n\n```javascript\ntransport.sendMail(mailOptions, callback);\n```\n\nWhere\n\n * `transport` is a transport method defined with `nodemailer.createTransport`\n * **mailOptions** defines the e-mail (set its subject, body text, receivers etc.), see **E-mail Message Fields** for details\n * **callback** is the callback function that will be run after the e-mail is sent or the sending failed (see **Return callback** for details)\n\n## Setting up a transport method\n\nBefore you can send any e-mails you need to set up a transport method. This can\nbe done with `nodemailer.createTransport(type, options)` where `type` indicates\nthe transport protocol and `options` defines how it is used.\n\n```javascript\nvar transport = nodemailer.createTransport(\"SMTP\", {smtp_options});\n```\n\nThe same transport object can and should be reused several times.\n\nWhen the transport method is defined, it can be used to send e-mail with `sendMail`\n\n```javascript\nvar transport = nodemailer.createTransport(\"SMTP\", {smtp_options});\n\ntransport.sendMail({\n from: \"sender@tr.ee\",\n to: \"receiver@tr.ee\"\n ...\n});\n```\n\n### Possible transport methods\n\nRequired `type` parameter can be one of the following:\n\n * **SMTP** for using SMTP\n * **SES** for using Amazon SES\n * **Sendmail** for utilizing systems *sendmail* command\n\n### Setting up SMTP\n\nSMTP is different from the other transport mechanisms, as in its case a connection\npool is created. All the connections try to stay alive as long as possible and\nare reusable to minimize the protocol overhead delay - for example setting up\nTLS for authenticating is relatively lengthy process (in CPU terms, not by human\nterms), you do not want to do it several times.\n\nPossible SMTP options are the following:\n\n * **service** - an optional well known service identifier (\"Gmail\", \"Hotmail\" etc., see **Well known Services** for a list of supported services) to auto-configure host, port and secure connection settings\n * **host** - hostname of the SMTP server (defaults to \"localhost\", not needed with `service`)\n * **port** - port of the SMTP server (defaults to 25, not needed with `service`)\n * **secureConnection** - use SSL (default is `false`, not needed with `service`). If you're using port 587 then keep `secureConnection` false, since the connection is started in insecure plain text mode and only later upgraded with STARTTLS\n * **name** - the name of the client server (defaults to machine name)\n * **auth** - authentication object as `{user:\"...\", pass:\"...\"}` or `{XOAuthToken: \"base64data\"}`\n * **ignoreTLS** - ignore server support for STARTTLS (defaults to `false`)\n * **debug** - output client and server messages to console\n * **maxConnections** - how many connections to keep in the pool (defaults to 5)\n\nExample:\n\n```javascript\nvar transport = nodemailer.createTransport(\"SMTP\", {\n service: \"Gmail\",\n auth: {\n user: \"gmail.user@gmail.com\",\n pass: \"userpass\"\n }\n});\n```\n\nor the same without `service` parameter\n\n```javascript\nvar transport = nodemailer.createTransport(\"SMTP\", {\n host: \"smtp.gmail.com\", // hostname\n secureConnection: true, // use SSL\n port: 465, // port for secure SMTP\n auth: {\n user: \"gmail.user@gmail.com\",\n pass: \"userpass\"\n }\n});\n```\n\n**NB!** if you want to close the pool (cancel all open connections) you can use `transport.close()`\n\n```javascript\n\nvar transport = nodemailer.createTransport(\"SMTP\",{});\n...\ntransport.close(); // close the pool\n```\n\n\n#### SMTP XOAUTH and token generation\n\n**nodemailer** supports XOAUTH authentication for SMTP. To use this, include `XOAuthToken` option in `auth` instead of the regular `user` and `pass`.\n\n```javascript\nvar transportOptions = {\n ...,\n auth: {\n XOAuthToken: \"R0VUIGh0dHBzOi8vbWFpbC5nb29....\"\n }\n}\n```\n\n**nodemailer** includes also built in XOAUTH token generator which can be used\nwith `nodemailer.createXOAuthGenerator()`. The function is preconfigured for\nGmail, so in this case only mandatory options are `user`, `token` and `tokenSecret`.\n\n```javascript\nvar XOAuthTokenGenerator = nodemailer.createXOAuthGenerator({\n user: \"test.nodemailer@gmail.com\",\n // requestUrl: \"https://oauth.access.point\",\n // consumerKey: \"anonymous\",\n // consumerSecret: \"anonymous\",\n token: \"1/O_HgoO4h2uOUfpus0V--7mygICXrQQ0ZajB3ZH52KqM\",\n tokenSecret: \"_mUBkIwNPnfQBUIWrJrpXJ0c\"\n });\n```\n\nOne of `user` or `requestUrl` is mandatory. `consumerKey` and `consumerSecret` both\ndefault to `\"anonymous\"`.\n\n```javascript\nvar transportOptions = {\n service: \"Gmail\",\n auth: {\n XOAuthToken: nodemailer.createXOAuthGenerator({\n user: \"test.nodemailer@gmail.com\",\n token: \"1/O_HgoO4h2uOUfpus0V--7mygICXrQQ0ZajB3ZH52KqM\",\n tokenSecret: \"_mUBkIwNPnfQBUIWrJrpXJ0c\"\n })\n }\n}\n```\n\n### Setting up SES\n\nSES is actually a HTTP based protocol, the compiled e-mail and related info\n(signatures and such) are sent as a HTTP request to SES servers.\n\nPossible SES options are the following:\n\n * **AWSAccessKeyID** - AWS access key (required)\n * **AWSSecretKey** - AWS secret (required)\n * **ServiceUrl** - optional API end point URL (defaults to *\"https://email.us-east-1.amazonaws.com\"*)\n\nExample:\n\n```javascript\nvar transport = nodemailer.createTransport(\"SES\", {\n AWSAccessKeyID: \"AWSACCESSKEY\",\n AWSSecretKey: \"AWS/Secret/key\"\n});\n```\n\n### Setting up Sendmail\n\nSendmail transport method streams the compiled message to the *stdin* of *sendmail*\ncommand.\n\nOptions object is optional, possible sendmail options are the following:\n\n * **path** - path to the `sendmail` command (defaults to *\"sendmail\"*)\n * **args** - an array of extra command line options to pass to the `sendmail` command (ie. `[\"-f sender@example.com\"]`)\n\nExample:\n\n```javascript\nvar transport = nodemailer.createTransport(\"sendmail\");\n```\n\nor\n\n```javascript\nvar transport = nodemailer.createTransport(\"sendmail\", {\n path: \"/usr/local/bin/sendmail\",\n args: [\"-f sender@example.com\"]\n});\n```\n\n### DKIM Signing\n\n**Nodemailer** supports DKIM signing with very simple setup. Use this with caution\nthough since the generated message needs to be buffered entirely before it can be\nsigned. Not a big deal with small messages but might consume a lot of RAM when\nusing larger attachments.\n\nSet up the DKIM signing with `useDKIM` method for a transport object:\n\n```javascript\ntransport.useDKIM(dkimOptions)\n```\n\nWhere `dkimOptions` includes necessary options for signing\n\n * **domainName** - the domainname that is being used for signing\n * **keySelector** - key selector. If you have set up a TXT record with DKIM public key at *zzz._domainkey.example.com* then `zzz` is the selector\n * **privateKey** - DKIM private key that is used for signing as a string\n * **headerFieldNames** - optional colon separated list of header fields to sign, by default all fields suggested by RFC4871 #5.5 are used\n\nAll messages transmitted through this transport objects are from now on DKIM signed.\n\nCurrently if several header fields with the same name exists, only the last one (the one in the bottom) is signed.\n\nExample:\n\n```javascript\nvar transport = nodemailer.createTransport(\"Sendmail\");\n\ntransport.useDKIM({\n domainName: \"node.ee\",\n keySelector: \"dkim\",\n privateKey: fs.readFileSync(\"private_key.pem\")\n});\n\ntransport.sendMail(mailOptions);\n```\n\nSee examples/example_dkim.js for a complete example.\n\n**NB!** Be careful when using services like Gmail, SES etc. through SMTP\n(SES API is handled by Nodemailer automatically) - these tend to modify some\nheaders like Message-Id or Date which invalidates the signature. In this case use\n`headerFieldNames` property to define only fields that won't be changed and leave\nout `Date` or any other unsupported field.\n\n### Well known services for SMTP\n\nIf you want to use a well known service as the SMTP host, you do not need\nto enter the hostname or port number, just use the `service` parameter (**NB!** case sensitive).\n\nCurrently cupported services are:\n\n * **\"Gmail\"** for Google Mail\n * **\"hot.ee\"** for www.hot.ee\n * **\"Hotmail\"** for Microsoft Live Hotmail\n * **\"iCloud\"** for Apple iCloud\n * **\"mail.ee\"** for www.mail.ee\n * **\"Postmark\"** for Postmark App\n * **\"SendGrid\"** for SendGrid\n * **\"SES\"** for Amazon SES\n * **\"Yahoo\"** for Yahoo Mail\n * **\"Zoho\"** for Zoho Mail\n\nPredefined service data covers `host`, `port` and secure connection settings,\nany other parameters (ie. `auth`) need to be set separately.\n\n## E-mail message fields\n\nThe following are the possible fields of an e-mail message:\n\n - **from** - The e-mail address of the sender. All e-mail addresses can be plain `sender@server.com` or formatted `Sender Name <sender@server.com>`\n - **to** - Comma separated list of recipients e-mail addresses that will appear on the `To:` field\n - **cc** - Comma separated list of recipients e-mail addresses that will appear on the `Cc:` field\n - **bcc** - Comma separated list of recipients e-mail addresses that will appear on the `Bcc:` field\n - **replyTo** - An e-mail address that will appear on the `Reply-To:` field\n - **inReplyTo** - The message-id this message is replying\n - **references** - Message-id list\n - **subject** - The subject of the e-mail\n - **text** - The plaintext version of the message\n - **html** - The HTML version of the message\n - **generateTextFromHTML** - if set to true uses HTML to generate plain text body part from the HTML if the text is not defined\n - **headers** - An object of additional header fields `{\"X-Key-Name\": \"key value\"}` (NB! values are passed as is, you should do your own encoding to 7bit if needed)\n - **attachments** - An array of attachment objects.\n - **envelope** - optional SMTP envelope, if auto generated envelope is not suitable\n - **messageId** - optional Message-Id value, random value will be generated if not set. Set to false to omit the Message-Id header\n - **encoding** - optional transfer encoding for the textual parts (defaults to \"quoted-printable\")\n\nAll text fields (e-mail addresses, plaintext body, html body) use UTF-8 as the encoding.\nAttachments are streamed as binary.\n\nExample:\n\n```javascript\nvar transport = nodemailer.createTransport(\"Sendmail\");\n\nvar mailOptions = {\n from: \"me@tr.ee\",\n to: \"me@tr.ee\",\n subject: \"Hello world!\",\n text: \"Plaintext body\"\n}\n\ntransport.sendMail(mailOptions);\n```\n\n### SendGrid support\n\nNodemailer supports SendGrid [SMTP API](http://docs.sendgrid.com/documentation/api/smtp-api/) out of the box - you can\nuse objects as header values and these are automatically JSONized (and mime encoded if needed).\n\n```javascript\nvar mailOptions = {\n ...,\n headers: {\n 'X-SMTPAPI': {\n category : \"newuser\",\n sub:{\n \"%name%\": [\"Žiguli Õllepruul\"]\n }\n }\n },\n subject: \"Hello, %name%\"\n}\n```\n\nThis also applies to any other service that expects a JSON string as a header value for specified key.\n\n### Generate Text from HTML\n\nIf `generateTextFromHTML` option is set to true, then HTML contents of the mail is automatically converted\nto plaintext format when plaintext content is empty or missing.\n\nFor example\n\n```javascript\nmailOptions = {\n ...,\n generateTextFromHTML: true,\n html: '<h1>Hello world</h1><p><b>How</b> are you?',\n // text: '' // no text part\n}\n```\n\nis automatically converted in the backround by Nodemailer to:\n\n```javascript\nmailOptions = {\n ...,\n // source html:\n html: '<h1>Hello world</h1><p><b>How</b> are you?',\n // automatically generated plaintext message:\n text: \"Hello world\\n\"+\n \"===========\\n\"+\n \"\\n\"+\n \"**How** are you?\"\n}\n```\n\nAs you can see the output syntax for `generateTextFromHTML` looks similar to markdown, and that\nis exactly the case here - Nodemailer includes a simple HTML to markdown converter. But don't\nexpect too much from it, it's not full featured or perfect, just some regexes here and there.\n\n### Attachment fields\n\nAttahcment object consists of the following properties:\n\n * **fileName** - filename to be reported as the name of the attached file, use of unicode is allowed (except when using Amazon SES which doesn't like it)\n * **cid** - optional content id for using inline images in HTML message source\n * **contents** - String or a Buffer contents for the attachment\n * **filePath** - path to a file or an URL if you want to stream the file instead of including it (better for larger attachments)\n * **streamSource** - Stream object for arbitrary binary streams if you want to stream the contents (needs to support *pause*/*resume*)\n * **contentType** - optional content type for the attachment, if not set will be derived from the `fileName` property\n * **contentDisposition** - optional content disposition type for the attachment, defaults to \"attachment\"\n\nOne of `contents`, `filePath` or `streamSource` must be specified, if none is\npresent, the attachment will be discarded. Other fields are optional.\n\nAttachments can be added as many as you want.\n\n```javascript\nvar mailOptions = {\n ...\n attachments: [\n { // utf-8 string as an attachment\n fileName: \"text1.txt\",\n contents: \"hello world!\n },\n { // binary buffer as an attachment\n fileName: \"text2.txt\",\n contents: new Buffer(\"hello world!,\"utf-8\")\n },\n { // file on disk as an attachment\n fileName: \"text3.txt\",\n filePath: \"/path/to/file.txt\" // stream this file\n },\n { // fileName and content type is derived from filePath\n filePath: \"/path/to/file.txt\"\n },\n { // stream as an attachment\n fileName: \"text4.txt\",\n streamSource: fs.createReadStream(\"file.txt\")\n },\n { // define custom content type for the attachment\n fileName: \"text.bin\",\n contents: \"hello world!,\n contentType: \"text/plain\"\n },\n { // use URL as an attachment\n fileName: \"license.txt\",\n filePath: \"https://raw.github.com/andris9/Nodemailer/master/LICENSE\"\n }\n ]\n}\n```\n\n### Address Formatting\n\nAll the e-mail addresses can be plain e-mail address\n\n```\nusername@example.com\n```\n\nor with formatted name (includes unicode support)\n\n```\n\"Ноде Майлер\" <username@example.com>\n```\n\nTo, Cc and Bcc fields accept comma separated list of e-mails. Formatting can be mixed.\n\n```\nusername@example.com, \"Ноде Майлер\" <username@example.com>, \"Name, User\" <username@example.com>\n```\n\nYou can even use unicode domain and user names, these are automatically converted\nto the supported form\n\n```\n\"Uncode Domain\" <info@müriaad-polüteism.info>\n```\n\n### SMTP envelope\n\nSMTP envelope is usually auto generated from `from`, `to`, `cc` and `bcc` fields but\nif for some reason you want to specify it yourself, you can do it with `envelope` property.\n\n`envelope` is an object with the following params: `from`, `to`, `cc` and `bcc` just like\nwith regular mail options. You can also use the regular address format.\n\n```javascript\nmailOptions = {\n ...,\n from: \"mailer@node.ee\",\n to: \"daemon@node.ee\",\n envelope: {\n from: \"Daemon <deamon@node.ee>\",\n to: \"mailer@node.ee, Mailer <mailer2@node.ee>\"\n }\n}\n```\n\n### Using Embedded Images\n\nAttachments can be used as embedded images in the HTML body. To use this\nfeature, you need to set additional property of the attachment - `cid` (unique\nidentifier of the file) which is a reference to the attachment file. The same\n`cid` value must be used as the image URL in HTML (using `cid:` as the URL\nprotocol, see example below).\n\n**NB!** the cid value should be as unique as possible!\n\n```javascript\nvar mailOptions = {\n ...\n html: \"Embedded image: <img src='cid:unique@node.ee' />\",\n attachments: [{\n filename: \"image.png\",\n filePath: \"/path/to/file\",\n cid: \"unique@node.ee\" //same cid value as in the html img src\n }]\n}\n```\n\n## Return callback\n\nReturn callback gets two parameters\n\n * **error** - an error object if the message failed\n * **responseStatus** - an object with some information about the status on success\n\nExample:\n\n```javascript\nnodemailer.sendMail(mailOptions, function(error, responseStatus){\n if(!error){\n console.log(responseStatus.message); // response from the server\n }\n});\n```\n\n## Tests\n\nRun the tests with npm in Nodemailer's directory\n\n```\nnpm test\n```\n\nThere aren't currently many tests for Nodemailer but there are a lot of tests\nin the modules that are used to generate the raw e-mail body and to use the\nSMTP client connection.\n\n## Tweaking\n\nNodemailer in itself is actually more like a wrapper for my other modules\n[mailcomposer](https://github.com/andris9/mailcomposer) for composing the raw message stream\nand [simplesmtp](https://github.com/andris9/simplesmtp) for delivering it, by providing an\nunified API. If there's some problems with particular parts of the\nmessage composing/sending process you should look at the appropriate module.\n\n## License\n\n**Nodemailer** is licensed under [MIT license](https://github.com/andris9/Nodemailer/blob/master/LICENSE). Basically you can do whatever you want to with it.\n",
+ "_id": "nodemailer@0.3.22",
+ "dist": {
+ "shasum": "be91fa155ba9c110ff35663073d5d7159d25d4b9"
+ },
+ "_from": "nodemailer@0.3.22"
+}