I am trying to receive e-mail through Mandrill like this:
app.post('/mail/enquiry', function (req, res) {
console.log('request at mail/enquiry');
console.log(req.mandrill_events);
res.sendStatus(200);
});
I am trying to find the message content from the POST request body. It is more difficult than I expected :(
Neither req.mandrill_events nor req.body.mandrill_events work.
req.body is something that begins with:
{ domain: null,
_events { finish [Function]},
Express 4 evaluates all middleware and routes in the order in which they were added, so you need to make sure body parsing middleware comes before your route in some way.