Updated server.js to pull emails