Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- router.get('/', function(req, res, next) {
- var transporter = nodemailer.createTransport({
- service: 'Gmail',
- //var info=info.response,
- auth: {
- user: 'xxxxx', // Your email id
- pass: 'xxxxx' // Your password
- }//auth
- });//transporter=nodemailer.create
- var mailOptions={
- to: 'xxxxxx',
- subject: req.body,
- //subject: "lt",
- text: "Email Test Has Passed"
- }//mailOptions
- transporter.sendMail(mailOptions, function (error, info, callback){
- if(error){
- console.log(error);
- res.json({yo: 'error'});
- }else{
- console.log('Message sent: ' + info.response);
- //console.log('info sent: ' + info);//[obj obj]
- infor=info.response;
- res.json({yo: info.response});
- };//else
- });//();//transporter.sendmail(mailoptions)
- res.render('index', {
- title: 'laundrytake: we clean and deliver your laundry/dry cleaning',
- page:'Home',
- });//atw is a local var inside the temp index feeded from myArtwork
- });//router.get(/)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement