Script to retrieve emails info