refactor getIdForEmail into another method to be used by other modules



<!---
@huboard:{"order":17.75,"milestone_order":45,"custom_state":"blocked"}
-->