forked from macarthuror/parse-smtp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
22 lines (18 loc) · 736 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// You can test it with `https://ethereal.email/`
const port = 587
const password = '3UjDDMnF6bAd98J8sU'
const host = 'smtp.ethereal.email'
const user = '[email protected]'
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`
const subject = 'Password subject Test for appName'
const { sendMail } = require('./index.js')({ host, port, fromAddress: user, user, password })
sendMail({ subject, text, to: user })
.then(data => {
console.log('SEND IT ---------')
})
.catch(err => {
console.error(err)
})
.finally(() => {
console.log('END --------')
})