Refactored way the way of getting the contact emails.