Skip to content

Commit 206c27d

Browse files
committed
Fixed smtp-params for calls with auth
1 parent 85349aa commit 206c27d

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
# Packages
66
node_modules
77
npm-debug.log
8+
.vscode

lib/unpackSMTPConfig.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ module.exports = function (envVarName, defaultUri, options) {
1818

1919
if (envObj.password() || envObj.username()) {
2020
outp['auth'] = {
21-
username: envObj.username(),
22-
password: envObj.password()
21+
user: envObj.username(),
22+
pass: envObj.password()
2323
}
2424
}
2525

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kth-node-configuration",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Configuration module for Node.js projects",
55
"main": "lib/index.js",
66
"repository": {

test/test-unpackSMTPConfig.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ describe('unpackSMTPConfig', function () {
3838

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

4545
it('sets secure on smtps', function () {

0 commit comments

Comments
 (0)