var nodemailer = require("nodemailer");
var transporter = nodemailer.createTransport({
  service: 'SendGrid',
  auth: {
    user: process.env.SENDGRID_USER,
    pass: process.env.SENDGRID_PASSWORD
  }
});

/**
 * GET /contact
 * Contact form page.
 */
exports.getContact = function(req, res) {
  res.render('contact', {
    title: 'Contact'
  });
};

/**
 * POST /contact
 * Send a contact form via Nodemailer.
 */
exports.postContact = function(req, res) {
  req.assert('name', 'Name cannot be blank').notEmpty();
  req.assert('email', 'Email is not valid').isEmail();
  req.assert('message', 'Message cannot be blank').notEmpty();

  var errors = req.validationErrors();

  if (errors) {
    req.flash('errors', errors);
    return res.redirect('/contact');
  }

  var from = req.body.email;
  var name = req.body.name;
  var body = req.body.message;
  var to = 'your@email.com';
  var subject = 'Contact Form | Hackathon Starter';

  var mailOptions = {
    to: to,
    from: from,
    subject: subject,
    text: body
  };

  transporter.sendMail(mailOptions, function(err) {
    if (err) {
      req.flash('errors', { msg: err.message });
      return res.redirect('/contact');
    }
    req.flash('success', { msg: 'Email has been sent successfully!' });
    res.redirect('/contact');
  });
};

@@ -96,16 +96,13 @@
 e: '
-SendGrid
+gmail
 ',%0A 
@@ -124,74 +124,66 @@
 er: 
-process.env.SENDGRID_USER,%0A    pass: process.env.SENDGRID_PASSWORD
+'donotreply.receptional@gmail.com',%0A    pass: 'nightowls1'
 %0A  %7D
@@ -444,325 +444,17 @@
 ) %7B%0A
-  req.assert('name', 'Name cannot be blank').notEmpty();%0A  req.assert('email', 'Email is not valid').isEmail();%0A  req.assert('message', 'Message cannot be blank').notEmpty();%0A%0A  var errors = req.validationErrors();%0A%0A  if (errors) %7B%0A    req.flash('errors', errors);%0A    return res.redirect('/contact');%0A  %7D%0A%0A  var from
+%0A  var to
  = r
@@ -537,81 +537,84 @@
 var 
-to = 'your@email.com';%0A  var subject = 'Contact Form %7C Hackathon Starter'
+from = 'donotreply.receptional@gmail.com';%0A  var subject = req.body.subject 
 ;%0A%0A 
@@ -704,16 +704,18 @@
 dy%0A  %7D;%0A
+  
 %0A  trans
@@ -819,24 +819,48 @@
 message %7D);%0A
+      console.log(err);%0A
       return
@@ -892,16 +892,44 @@
 ;%0A    %7D%0A
+    console.log(%22success%22);%0A
     req.

Update contact.js