m0603vasilisa 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/nodemailervasilisa.js +22 -0
- package/package.json +11 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
const nodemailer =require("nodemailer");
|
2
|
+
|
3
|
+
module.exports.send = (from, pass, message) => {
|
4
|
+
const transporter = nodemailer.createTransport(
|
5
|
+
{
|
6
|
+
host: 'smtp.mail.ru',
|
7
|
+
port: 465,
|
8
|
+
secure: true,
|
9
|
+
auth: {
|
10
|
+
user: from,
|
11
|
+
pass: pass
|
12
|
+
}
|
13
|
+
},
|
14
|
+
{
|
15
|
+
from: `Nodemailer Vasilisa <${from}>`,
|
16
|
+
}
|
17
|
+
)
|
18
|
+
transporter.sendMail(message, (err, info) => {
|
19
|
+
if(err) return console.log(err)
|
20
|
+
console.log('Email sent: ', info)
|
21
|
+
})
|
22
|
+
}
|
package/package.json
ADDED