mails retrieving funcrions are moved to corresponding helper