server side fix for useremail escaping in registration email.
refactored emailmockutil to make it clean.