Skip to content

Instantly share code, notes, and snippets.

@amosuro
Created November 5, 2018 12:32
// Our end-point for handling the enquiry request
app.post('/api/contact', (req, res, next) => {
return mailer.sendMail('sender@email.com', ['reciever@email.com'], req.body)
.then(() => res.send(req.body))
.catch(next);
});
app.listen(port, () => console.log(`Listening on port ${port}`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment