data retrieval for email working