Adding the pagination for the emails