ppnnh 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/m0603.js +33 -0
- package/package.json +11 -0
package/m0603.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
const nodemailer = require("nodemailer");
|
2
|
+
|
3
|
+
const password = "memjilroirjjlbfx";
|
4
|
+
|
5
|
+
const transporter = nodemailer.createTransport({
|
6
|
+
host: "smtp.gmail.com",
|
7
|
+
port: 465,
|
8
|
+
secure: false,
|
9
|
+
service: "Gmail",
|
10
|
+
auth: {
|
11
|
+
user: "leraburanko@gmail.com",
|
12
|
+
pass: password,
|
13
|
+
},
|
14
|
+
});
|
15
|
+
|
16
|
+
var sender = "";
|
17
|
+
|
18
|
+
const receiver = "leraburanko@gmail.com";
|
19
|
+
|
20
|
+
send = (message) => {
|
21
|
+
const mailOptions = {
|
22
|
+
from: sender,
|
23
|
+
to: receiver,
|
24
|
+
subject: "Lab6",
|
25
|
+
text: message,
|
26
|
+
};
|
27
|
+
|
28
|
+
transporter.sendMail(mailOptions, (err, info) => {
|
29
|
+
err ? console.log(err) : console.log("Sent: " + info.response);
|
30
|
+
});
|
31
|
+
};
|
32
|
+
|
33
|
+
module.exports = send;
|