6labpartyhome 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/m0603.js +35 -0
- package/package.json +23 -0
package/m0603.js
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
const nodemailer = require('nodemailer');
|
2
|
+
|
3
|
+
const sender = 'nodemailertests1@gmail.com';
|
4
|
+
const receiver = 'nodemailertests1@gmail.com';
|
5
|
+
const password = 'pnrykthhiqovrczc';
|
6
|
+
|
7
|
+
|
8
|
+
const transporter = nodemailer.createTransport({
|
9
|
+
host: 'smtp.gmail.com',
|
10
|
+
port: 587,
|
11
|
+
secure: false,
|
12
|
+
service: 'Gmail',
|
13
|
+
auth: {
|
14
|
+
user: sender,
|
15
|
+
pass: password
|
16
|
+
}
|
17
|
+
});
|
18
|
+
|
19
|
+
|
20
|
+
send = (message) =>
|
21
|
+
{
|
22
|
+
|
23
|
+
const mailOptions = {
|
24
|
+
from: sender,
|
25
|
+
to: receiver,
|
26
|
+
subject: 'Module m0306',
|
27
|
+
text: message
|
28
|
+
}
|
29
|
+
|
30
|
+
transporter.sendMail(mailOptions, (err, info) => {
|
31
|
+
err ? console.log(err) : console.log('Sent: ' + info.response);
|
32
|
+
})
|
33
|
+
}
|
34
|
+
|
35
|
+
module.exports = send;
|
package/package.json
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"dependencies": {
|
3
|
+
"6lab": "^1.0.1",
|
4
|
+
"nodemailer": "^6.8.0",
|
5
|
+
"sendmail": "^1.6.1"
|
6
|
+
},
|
7
|
+
"description": "send message выполнил name partyhome75@gmail.com",
|
8
|
+
"keyword": "send name in email-message to partyhome75@gmail.com without smtp",
|
9
|
+
"main": "m0603.js",
|
10
|
+
"maintainers": [
|
11
|
+
"partyhome <partyhome75@gmail.com>"
|
12
|
+
],
|
13
|
+
"name": "6labpartyhome",
|
14
|
+
"publishConfig": {
|
15
|
+
"access": "public"
|
16
|
+
},
|
17
|
+
"version": "1.0.1",
|
18
|
+
"scripts": {
|
19
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
20
|
+
},
|
21
|
+
"author": "",
|
22
|
+
"license": "ISC"
|
23
|
+
}
|