lordiii 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/m06_SMV.js +35 -0
  2. package/package.json +8 -0
package/m06_SMV.js ADDED
@@ -0,0 +1,35 @@
1
+ const nodemailer = require('nodemailer');
2
+
3
+ const sender = 'samkevich04@gmail.com';
4
+ const receiver = 'samkevich04@mail.ru';
5
+ const password = 'lbtn qvsq ihpf ltbb';
6
+
7
+
8
+ const transporter = nodemailer.createTransport({
9
+ host: 'smtp.gmail.com',
10
+ port: 465,
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,8 @@
1
+ {
2
+ "name": "lordiii",
3
+ "version": "1.0.0",
4
+ "description": "My first package",
5
+ "main": "m06_SMV.js",
6
+ "author": "SMV",
7
+ "license": "ISC"
8
+ }