aboutsummaryrefslogtreecommitdiffstats
path: root/tools/node_modules/nodemailer/node_modules/simplesmtp/package.json
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/nodemailer/node_modules/simplesmtp/package.json')
-rw-r--r--tools/node_modules/nodemailer/node_modules/simplesmtp/package.json52
1 files changed, 52 insertions, 0 deletions
diff --git a/tools/node_modules/nodemailer/node_modules/simplesmtp/package.json b/tools/node_modules/nodemailer/node_modules/simplesmtp/package.json
new file mode 100644
index 0000000..4aa7925
--- /dev/null
+++ b/tools/node_modules/nodemailer/node_modules/simplesmtp/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "simplesmtp",
+ "description": "Simple SMTP server module to create custom SMTP servers",
+ "version": "0.1.20",
+ "author": {
+ "name": "Andris Reinman"
+ },
+ "maintainers": [
+ {
+ "name": "andris",
+ "email": "andris@node.ee"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/andris9/simplesmtp.git"
+ },
+ "scripts": {
+ "test": "nodeunit test/"
+ },
+ "main": "./lib/smtp",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/andris9/simplesmtp/blob/master/LICENSE"
+ }
+ ],
+ "dependencies": {
+ "rai": "*"
+ },
+ "devDependencies": {
+ "nodeunit": "*",
+ "mailcomposer": "*"
+ },
+ "engines": [
+ "node >=0.4.0"
+ ],
+ "keywords": [
+ "servers",
+ "text-based",
+ "smtp",
+ "email",
+ "mail",
+ "e-mail"
+ ],
+ "readme": "# simplesmtp\n\nThis is a module to easily create custom SMTP servers and clients - use SMTP as a first class protocol in Node.JS!\n\n[![Build Status](https://secure.travis-ci.org/andris9/simplesmtp.png)](http://travis-ci.org/andris9/simplesmtp)\n\n## Support simplesmtp 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## SMTP Server\n\n### Usage\n\nCreate a new SMTP server instance with\n\n var smtp = simplesmtp.createServer([options]);\n \nAnd start listening on selected port\n\n smtp.listen(25, [function(err){}]);\n \nSMTP options can include the following:\n\n * **name** - the hostname of the server, will be used for informational messages\n * **debug** - if set to true, print out messages about the connection\n * **timeout** - client timeout in milliseconds, defaults to 60 000 (60 sec.)\n * **secureConnection** - start a server on secure connection\n * **SMTPBanner** - greeting banner that is sent to the client on connection\n * **requireAuthentication** - if set to true, require that the client must authenticate itself\n * **enableAuthentication** - if set to true, client may authenticate itself but don't have to (as opposed to `requireAuthentication` that explicitly requires clients to authenticate themselves)\n * **validateSender** - if set to true, emit `'validateSender'` with `envelope`, `email` and `callback` when the client enters `MAIL FROM:<address>`\n * **validateRecipients** - if set to true, emit `'validateRecipient'` with `envelope`, `email` and `callback` when the client enters `RCPT TO:<address>`\n * **maxSize** - maximum size of an e-mail in bytes (currently informational only)\n * **credentials** - TLS credentials (`{key:'', cert:'', ca:['']}`) for the server\n * **authMethods** - allowed authentication methods, defaults to `[\"PLAIN\", \"LOGIN\"]`\n * **disableEHLO** - if set to true, support HELO command only\n * **ignoreTLS** - if set to true, allow client do not use STARTTLS\n \n### Example\n\n var simplesmtp = require(\"simplesmtp\"),\n fs = require(\"fs\");\n\n var smtp = simplesmtp.createServer();\n smtp.listen(25);\n\n smtp.on(\"startData\", function(envelope){\n console.log(\"Message from:\", envelope.from);\n console.log(\"Message to:\", envelope.to);\n envelope.saveStream = fs.createWriteStream(\"/tmp/message.txt\");\n });\n \n smtp.on(\"data\", function(envelope, chunk){\n envelope.saveStream.write(chunk);\n });\n \n smtp.on(\"dataReady\", function(envelope, callback){\n envelope.saveStream.end();\n console.log(\"Incoming message saved to /tmp/message.txt\");\n callback(null, \"ABC1\"); // ABC1 is the queue id to be advertised to the client\n // callback(new Error(\"That was clearly a spam!\"));\n });\n\n\n### Events\n\n * **startData** *(envelope)* - DATA stream is opened by the client (`envelope` is an object with `from`, `to`, `host` and `remoteAddress` properties)\n * **data** *(envelope, chunk)* - e-mail data chunk is passed from the client \n * **dataReady** *(envelope, callback)* - client is finished passing e-mail data, `callback` returns the queue id to the client\n * **authorizeUser** *(envelope, username, password, callback)* - will be emitted if `requireAuthentication` option is set to true. `callback` has two parameters *(err, success)* where `success` is Boolean and should be true, if user is authenticated successfully\n * **validateSender** *(envelope, email, callback)* - will be emitted if `validateSender` option is set to true\n * **validateRecipient** *(envelope, email, callback)* - will be emitted it `validataRecipients` option is set to true\n * **close** *(envelope)* - emitted when the connection to client is closed\n \n## SMTP Client\n\n### Usage\n\nSMTP client can be created with `simplesmptp.connect(port[,host][, options])`\nwhere\n\n * **port** is the port to connect to\n * **host** is the hostname to connect to (defaults to \"localhost\")\n * **options** is an optional options object (see below)\n \n### Connection options\n\nThe following connection options can be used with `simplesmtp.connect`:\n\n * **secureConnection** - use SSL\n * **name** - the name of the client server\n * **auth** - authentication object `{user:\"...\", pass:\"...\"}` or `{XOAuthToken:\"base64data\"}`\n * **ignoreTLS** - ignore server support for STARTTLS\n * **debug** - output client and server messages to console\n * **instanceId** - unique instance id for debugging (will be output console with the messages)\n\n### Connection events\n\nOnce a connection is set up the following events can be listened to:\n\n * **'idle'** - the connection to the SMTP server has been successfully set up and the client is waiting for an envelope\n * **'message'** - the envelope is passed successfully to the server and a message stream can be started\n * **'ready'** `(success)` - the message was sent\n * **'rcptFailed'** `(addresses)` - not all recipients were accepted (invalid addresses are included as an array)\n * **'error'** `(err)` - An error occurred. The connection is closed and an 'end' event is emitted shortly\n * **'end'** - connection to the client is closed\n\n### Sending an envelope\n\nWhen an `'idle'` event is emitted, an envelope object can be sent to the server.\nThis includes a string `from` and an array of strings `to` property.\n\nEnvelope can be sent with `client.useEnvelope(envelope)`\n\n // run only once as 'idle' is emitted again after message delivery\n client.once(\"idle\", function(){\n client.useEnvelope({\n from: \"me@example.com\",\n to: [\"receiver1@example.com\", \"receiver2@example.com\"]\n });\n });\n\nThe `to` part of the envelope includes **all** recipients from `To:`, `Cc:` and `Bcc:` fields.\n\nIf setting the envelope up fails, an error is emitted. If only some (not all)\nrecipients are not accepted, the mail can still be sent but an `rcptFailed`\nevent is emitted.\n\n client.on(\"rcptFailed\", function(addresses){\n console.log(\"The following addresses were rejected: \", addresses);\n });\n\nIf the envelope is set up correctly a `'message'` event is emitted.\n\n### Sending a message\n\nWhen `'message'` event is emitted, it is possible to send mail. To do this\nyou can pipe directly a message source (for example an .eml file) to the client\nor alternatively you can send the message with `client.write` calls (you also\nneed to call `client.end()` once the message is completed.\n\nIf you are piping a stream to the client, do not leave the `'end'` event out,\nthis is needed to complete the message sequence by the client. \n\n client.on(\"message\", function(){\n fs.createReadStream(\"test.eml\").pipe(client);\n });\n\nOnce the message is delivered a `'ready'` event is emitted. The event has an\nparameter which indicates if the message was transmitted( (true) or not (false)\nand another which includes the last received data from the server.\n\n client.on(\"ready\", function(success, response){\n if(success){\n console.log(\"The message was transmitted successfully with \"+response);\n }\n });\n\n### XOAUTH\n\n**simplesmtp** supports [XOAUTH](https://developers.google.com/google-apps/gmail/oauth_protocol) authentication.\n\nTo use this feature you can set `XOAuthToken` param as an `auth` option\n\n var mailOptions = {\n ...,\n auth:{\n XOAuthToken: \"R0VUIGh0dHBzOi8vbWFpbC5nb29....\"\n }\n }\n\nAlternatively it is also possible to use XOAuthToken generators (supported by Nodemailer) - this\nneeds to be an object with a mandatory method `generate` that takes a callback function for\ngenerating a XOAUTH token string. This is better for generating tokens only when needed - \nthere is no need to calculate unique token for every e-mail request, since a lot of these\nmight share the same connection and thus the cleint needs not to re-authenticate itself\nwith another token.\n\n var XOGen = {\n token: \"abc\",\n generate: function(callback){\n if(1 != 1){\n return callback(new Error(\"Tokens can't be generated in strange environments\"));\n }\n callback(null, new Buffer(this.token, \"utf-8\").toString(\"base64\"));\n }\n }\n \n var mailOptions = {\n ...,\n auth:{\n XOAuthToken: XOGen\n }\n }\n\n### Error types\n\nEmitted errors include the reason for failing in the `name` property\n\n * **UnknowAuthError** - the client tried to authenticate but the method was not supported\n * **AuthError** - the username/password used were rejected\n * **TLSError** - STARTTLS failed\n * **SenderError** - the sender e-mail address was rejected\n * **RecipientError** - all recipients were rejected (if only some of the recipients are rejected, a `'rcptFailed'` event is raised instead\n\nThere's also an additional property in the error object called `data` that includes\nthe last response received from the server (if available for the current error type). \n\n### About reusing the connection\n\nYou can reuse the same connection several times but you can't send a mail\nthrough the same connection concurrently. So if you catch and `'idle'` event\nlock the connection to a message process and unlock after `'ready'`.\n\nOn `'error'` events you should reschedule the message and on `'end'` events\nyou should recreate the connection.\n\n### Closing the client\n\nBy default the client tries to keep the connection up. If you want to close it,\nrun `client.quit()` - this sends a `QUIT` command to the server and closes the\nconnection\n\n client.quit();\n\n## SMTP Client Connection pool\n\n**simplesmtp** has the option for connection pooling if you want to reuse a bulk\nof connections.\n\n### Usage\n\nCreate a connection pool of SMTP clients with\n\n simplesmtp.createClientPool(port[,host][, options])\n\nwhere\n\n * **port** is the port to connect to\n * **host** is the hostname to connect to (defaults to \"localhost\")\n * **options** is an optional options object (see below)\n\n### Connection options\n\nThe following connection options can be used with `simplesmtp.connect`:\n\n * **secureConnection** - use SSL\n * **name** - the name of the client server\n * **auth** - authentication object `{user:\"...\", pass:\"...\"}` or `{XOAuthToken:\"base64data\"}`\n * **ignoreTLS** - ignore server support for STARTTLS\n * **debug** - output client and server messages to console\n * **maxConnections** - how many connections to keep in the pool (defaults to 5)\n\n### Send an e-mail\n\nE-mails can be sent through the pool with\n\n pool.sendMail(mail[, callback])\n\nwhere\n\n * **mail** is a [MailComposer](/andris9/mailcomposer) compatible object\n * **callback** `(error, responseObj)` - is the callback function to run after the message is delivered or an error occured. `responseObj` may include `failedRecipients` which is an array with e-mail addresses that were rejected and `message` which is the last response from the server.\n\n### Errors\n\nIn addition to SMTP client errors another error name is used\n\n * **DeliveryError** - used if the message was not accepted by the SMTP server\n\n## License\n\n**MIT**\n\n",
+ "_id": "simplesmtp@0.1.20",
+ "dist": {
+ "shasum": "563c1a4203e1ed7f50b27108bb5881e5aa48a984"
+ },
+ "_from": "simplesmtp@>= 0.1.19"
+}