From b745e59c139d31e09def4cab0f490e7e44b37eb7 Mon Sep 17 00:00:00 2001 From: insane1304 Date: Thu, 8 Apr 2021 02:46:30 +0530 Subject: [PATCH] fixed email --- server.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/server.js b/server.js index 03a9bc8..55e3f41 100644 --- a/server.js +++ b/server.js @@ -28,8 +28,8 @@ app.use(passport.initialize()); app.use(passport.session()); app.use(flash()); -// mongoose.connect("mongodb://localhost:27017/todo",{useNewUrlParser:true, useUnifiedTopology: true }); -mongoose.connect(process.env.DATABASE_URL,{useNewUrlParser:true, useUnifiedTopology: true }); +mongoose.connect("mongodb://localhost:27017/todo",{useNewUrlParser:true, useUnifiedTopology: true }); +// mongoose.connect(process.env.DATABASE_URL,{useNewUrlParser:true, useUnifiedTopology: true }); mongoose.set("useCreateIndex", true); const connection = mongoose.connection; connection.once('open', () => { @@ -214,13 +214,19 @@ app.post("/signup",function(req,res) from: process.env.GMAIL_ID, to: vEmail, subject: 'Registration on VMS', - // text: 'Thanks for registration', + text: 'Thanks for registration. You have successfully registered.\nYour username is: '+vId+'\nYou can now use your username and password to login to your profile.\nBelow is your QR code. You need to scan this QR to have access to the building' , attachDataUrls: true, - html:'You have successfully registered. '+ - 'Your username is: '+vId+''+ - ' You can now use your username and password to login to VMS'+ - ' Below is your QR code. You need to scan this QR to have access to the building
'+ - '' + attachments:[ + { + filename:"qrcode.png", + path:img, + } + ] + // html:'You have successfully registered. '+ + // 'Your username is: '+vId+''+ + // ' You can now use your username and password to login to VMS'+ + // ' Below is your QR code. You need to scan this QR to have access to the building
'+ + // '' }; transporter.sendMail(mailOptions, function(error, info){