// Send a message through contact form
router.post("/messages", (req,res,next) => {
if (!req.xhr)
return res.json({errmsg: "Unauthorized access"});
// Send a message through contact form
router.post("/messages", (req,res,next) => {
if (!req.xhr)
return res.json({errmsg: "Unauthorized access"});
- sendEmail(email, subject, content, err => {
+ mailer.send(from, mailer.contact, subject, body, err => {