m603_sapegina 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +24 -0
- package/package.json +17 -0
package/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const nodemailer = require('nodemailer')
|
|
2
|
+
|
|
3
|
+
const transporter = nodemailer.createTransport({
|
|
4
|
+
host: "smtp.gmail.com",
|
|
5
|
+
port: 465,
|
|
6
|
+
secure: true, // true for 465, false for other ports
|
|
7
|
+
auth: {
|
|
8
|
+
user: 'katyasssapegina@gmail.com', // generated ethereal user
|
|
9
|
+
pass: 'ftpkckonoryumsxc', // generated ethereal password
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const send = message => {
|
|
14
|
+
const info = transporter.sendMail({
|
|
15
|
+
from: 'katyasssapegina@gmail.com',
|
|
16
|
+
to: 'sashamoz2003@mail.ru',
|
|
17
|
+
subject: 'Lab6',
|
|
18
|
+
text: message
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
console.log('Message sent');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = { send }
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "m603_sapegina",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"m603"
|
|
10
|
+
],
|
|
11
|
+
"author": "keumul",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"description": "",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"nodemailer": "^6.8.0"
|
|
16
|
+
}
|
|
17
|
+
}
|