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.
@@ -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
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "m0603vasilisa",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "nodemailervasilisa.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "Vasilisa Kashperko",
10
+ "license": "ISC"
11
+ }