Skip to content

Commit 2488afd

Browse files
committed
nodemailer upgrade - test file
1 parent 7929992 commit 2488afd

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
9+
[*.js]
10+
end_of_line = lf
11+
insert_final_newline = true
12+
charset = utf-8
13+
indent_style = space
14+
indent_size = 2

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,4 @@ var SmtpMailAdapter = mailOptions => {
311311
});
312312
}
313313

314-
module.exports = SmtpMailAdapter;
314+
module.exports = SmtpMailAdapter;

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "parse-smtp-template",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "Parse Server Module to send emails via SMTP with a customizable template option and Multi Language",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "node test.js"
88
},
99
"repository": {
1010
"type": "git",
@@ -26,7 +26,7 @@
2626
},
2727
"homepage": "https://github.com/macarthuror/parse-smtp-template#readme",
2828
"dependencies": {
29-
"nodemailer": "4.7.0"
29+
"nodemailer": "6.4.8"
3030
},
3131
"devDependencies": {}
3232
}

test.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// You can test it with `https://ethereal.email/`
2+
3+
const port = 587
4+
const password = '3UjDDMnF6bAd98J8sU'
5+
const host = 'smtp.ethereal.email'
6+
const user = '[email protected]'
7+
8+
const text = `Hi,\n\nYou are being asked to confirm the e-mail address ${user} with appName\n\n Click here to confirm it:\nhttp://myparseapp.com/actionTest?username=YourUsername`
9+
const subject = 'Password subject Test for appName'
10+
11+
const { sendMail } = require('./index.js')({ host, port, fromAddress: user, user, password })
12+
13+
sendMail({ subject, text, to: user })
14+
.then(data => {
15+
console.log('SEND IT ---------')
16+
})
17+
.catch(err => {
18+
console.error(err)
19+
})
20+
.finally(() => {
21+
console.log('END --------')
22+
})

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# yarn lockfile v1
33

44

5-
nodemailer@4.7.0:
6-
version "4.7.0"
7-
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-4.7.0.tgz#4420e06abfffd77d0618f184ea49047db84f4ad8"
8-
integrity sha512-IludxDypFpYw4xpzKdMAozBSkzKHmNBvGanUREjJItgJ2NYcK/s8+PggVhj7c2yGFQykKsnnmv1+Aqo0ZfjHmw==
5+
nodemailer@6.4.8:
6+
version "6.4.8"
7+
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.4.8.tgz#aca52886e4e56f71f6b8a65f5ca6b767ca751fc7"
8+
integrity sha512-UbJD0+g5e2H20bWv7Rpj3B+N3TMMJ0MLoLwaGVJ0k3Vo8upq0UltwHJ5BJfrpST1vFa91JQ8cf7cICK5DSIo1Q==

0 commit comments

Comments
 (0)