nodemailer-smtp-transport
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -7,2 +7,3 @@ 'use strict'; | ||
// expose to the world | ||
module.exports = function(options) { | ||
@@ -12,2 +13,8 @@ return new SMTPTransport(options); | ||
/** | ||
* Creates a SMTP transport object for Nodemailer | ||
* | ||
* @constructor | ||
* @param {Object} options Connection options | ||
*/ | ||
function SMTPTransport(options) { | ||
@@ -31,3 +38,9 @@ var hostData; | ||
SMTPTransport.prototype.send = function(envelope, message, callback) { | ||
/** | ||
* Sends an e-mail using the selected settings | ||
* | ||
* @param {Object} builder BuildMail object | ||
* @param {Function} callback Callback function | ||
*/ | ||
SMTPTransport.prototype.send = function(builder, callback) { | ||
var connection = new SMTPConnection(this.options), | ||
@@ -45,3 +58,3 @@ returned = false; | ||
var sendMessage = function() { | ||
connection.send(envelope, message, function(err, info) { | ||
connection.send(builder.getEnvelope(), builder.createReadStream(), function(err, info) { | ||
if (returned) { | ||
@@ -48,0 +61,0 @@ return; |
{ | ||
"name": "nodemailer-smtp-transport", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "SMTP transport for Nodemailer", | ||
@@ -5,0 +5,0 @@ "main": "lib/smtp-transport.js", |
# SMTP transport module for Nodemailer | ||
Applies for Nodemailer v1.x and not for v0.x where transports are built-in. | ||
## Usage | ||
@@ -42,2 +44,2 @@ | ||
**MIT** | ||
**MIT** |
5965
100
45