Finally got this to work! It seems that the nodemailer plugin has a dependency on node v 6.0.0. As soon as I changed the dependency to a compatible version the problem was solved.

Hope this helps someone else facing the same issue.