nodemailer-smtp-transport
Advanced tools
Comparing version
{ | ||
"name": "nodemailer-smtp-transport", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "SMTP transport for Nodemailer", | ||
"main": "lib/smtp-transport.js", | ||
"main": "src/smtp-transport.js", | ||
"scripts": { | ||
@@ -7,0 +7,0 @@ "test": "grunt" |
@@ -21,2 +21,24 @@ # SMTP transport module for Nodemailer | ||
```javascript | ||
var transporter = nodemailer.createTransport(smtpTransport(options)) | ||
``` | ||
Where | ||
* **options** defines connection data | ||
* **options.port** is the port to connect to (defaults to 25 or 465) | ||
* **options.host** is the hostname or IP address to connect to (defaults to 'localhost') | ||
* **options.secure** defines if the connection should use SSL (if `true`) or not (if `false`) | ||
* **options.ignoreTLS** turns off STARTTLS support if true | ||
* **options.name** optional hostname of the client, used for identifying to the server | ||
* **options.localAddress** is the local interface to bind to for network connections | ||
* **options.connectionTimeout** how many milliseconds to wait for the connection to establish | ||
* **options.greetingTimeout** how many milliseconds to wait for the greeting after connection is established | ||
* **options.socketTimeout** how many milliseconds of inactivity to allow | ||
* **options.debug** if true, the connection emits all traffic between client and server as 'log' events | ||
* **options.authMethod** defines preferred authentication method, eg. 'PLAIN' | ||
* **options.tls** defines additional options to be passed to the socket constructor, eg. *{rejectUnauthorized: true}* | ||
**Example** | ||
```javascript | ||
var transport = nodemailer.createTransport(smtpTransport({ | ||
@@ -28,3 +50,5 @@ host: 'localhost', | ||
pass: 'password' | ||
} | ||
}, | ||
maxConnections: 5, | ||
maxMessages: 10 | ||
})); | ||
@@ -44,4 +68,7 @@ ``` | ||
See the list of all supported services [here](https://github.com/andris9/nodemailer-wellknown#supported-services). | ||
## License | ||
**MIT** |
7427
23.58%72
60%