-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkw.js
37 lines (32 loc) · 822 Bytes
/
kw.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var http = require('http');
http.createServer(function(req,res){
res.writeHead(200,{'Content-Type':'text/html'});
res.end('Yellow is yol');
}).listen(8080);
var nodemailer = require('nodemailer');
var express = require('express');
var app = express();
app.get('/lt',function(req,res){
res.send(C:\Users\Neelendu\Desktop\lt.html);
});
app.listen(3000);
var transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: 'ngbs007@gmail.com',
pass: ''
}
});
var mailOptions = {
from: 'ngbs007@gmail.com',
to: 'neelendu.wadhwa17@rediffmail.com',
subject: 'Yo',
text: 'lp'
};
transporter.sendMail(mailOptions, function(error, info){
if (error) {
console.log(error);
} else {
console.log('Email sent: ' + info.response);
}
});