mailin
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -144,3 +144,7 @@ 'use strict'; | ||
to: connection.to, | ||
connectionId: connection.id | ||
connectionId: connection.id, | ||
authentication: { | ||
username: connection.authentication.username || null, | ||
authenticated: connection.authentication.authenticated | ||
} | ||
}); | ||
@@ -297,2 +301,8 @@ }); | ||
/* Add the connection authentication to the parsedEmail. */ | ||
parsedEmail.authentication = { | ||
username: connection.authentication.username || null, | ||
authenticated: connection.authentication.authenticated | ||
}; | ||
/* Add envelope data to the parsedEmail. */ | ||
@@ -299,0 +309,0 @@ parsedEmail.envelopeFrom = mimelib.parseAddresses(envelopeFrom); |
{ | ||
"name": "mailin", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Artisanal inbound emails for every web app", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -112,2 +112,3 @@ #Mailin [![Build Status](https://travis-ci.org/Flolagale/mailin.svg?branch=master)](https://travis-ci.org/Flolagale/mailin) | ||
connectionId: 'gez8t84g', | ||
authentication: { username: null, authenticated: false }, | ||
envelopeFrom: [ { address: 'john.doe@somewhere.com', name: 'John Doe' } ], | ||
@@ -144,3 +145,5 @@ envelopeTo: [ { address: 'jane.doe@somewhereelse.com', name: 'Jane Doe' } ] | ||
to: 'someaddress@yourdomain.com', | ||
connectionId: 't84h5ugf' | ||
connectionId: 't84h5ugf', | ||
authentication: { username: null, authenticated: false } | ||
} | ||
}; */ | ||
@@ -147,0 +150,0 @@ console.log(messageInfo); |
@@ -41,2 +41,3 @@ /* jshint expr: true */ | ||
var connectionId = null; | ||
var authentication = null; | ||
mailin.on('startMessage', function (messageInfo) { | ||
@@ -46,2 +47,3 @@ console.log("Event 'startMessage' triggered."); | ||
connectionId = messageInfo.connectionId; | ||
authentication = messageInfo.authentication; | ||
}); | ||
@@ -134,3 +136,4 @@ | ||
cc: [], | ||
connectionId: connectionId | ||
connectionId: connectionId, | ||
authentication: authentication | ||
}); | ||
@@ -215,3 +218,4 @@ | ||
language: 'pidgin', | ||
cc: [] | ||
cc: [], | ||
authentication: { username: null, authenticated: false } | ||
}); | ||
@@ -218,0 +222,0 @@ |
358068
987
183