06_lad_al2lo 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_LAD.js +23 -0
  2. package/package.json +15 -0
package/m06_LAD.js ADDED
@@ -0,0 +1,23 @@
1
+ var nodemailer = require('nodemailer');
2
+
3
+ async function send(mail,recMail, password, message){
4
+ console.log(mail +" " + recMail + " " + password+ " " + message)
5
+ const transporter = nodemailer.createTransport({
6
+ host:"smtp-mail.outlook.com",
7
+ port:587,
8
+ secure:false,
9
+ auth:{
10
+ user:mail,
11
+ pass:password,
12
+ },
13
+ });
14
+ const info = await transporter.sendMail({
15
+ from:mail,
16
+ to:recMail,
17
+ subject:"Hello",
18
+ text:message,
19
+ });
20
+ console.log(info.messageId);
21
+ }
22
+
23
+ module.exports = {send}
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "dependencies": {
3
+ "nodemailer": "^6.9.6"
4
+ },
5
+ "name": "06_lad_al2lo",
6
+ "version": "1.0.0",
7
+ "main": "m06_LAD.js",
8
+ "devDependencies": {},
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "author": "",
13
+ "license": "ISC",
14
+ "description": ""
15
+ }