Skip to content

Commit

Permalink
Fixed smtp-params for calls with auth
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsware committed Jan 23, 2017
1 parent 85349aa commit 206c27d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# Packages
node_modules
npm-debug.log
.vscode
4 changes: 2 additions & 2 deletions lib/unpackSMTPConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ module.exports = function (envVarName, defaultUri, options) {

if (envObj.password() || envObj.username()) {
outp['auth'] = {
username: envObj.username(),
password: envObj.password()
user: envObj.username(),
pass: envObj.password()
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kth-node-configuration",
"version": "1.3.0",
"version": "1.3.1",
"description": "Configuration module for Node.js projects",
"main": "lib/index.js",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions test/test-unpackSMTPConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('unpackSMTPConfig', function () {

it('can handle auth', function () {
const obj = unpackSMTPConfig('no-env-exists', testURIWithSSL)
expect(obj.auth.password).to.equal('password')
expect(obj.auth.username).to.equal('username')
expect(obj.auth.pass).to.equal('password')
expect(obj.auth.user).to.equal('username')
})

it('sets secure on smtps', function () {
Expand Down

0 comments on commit 206c27d

Please sign in to comment.