Fixes #221 and #222 - refactoring email services to use interfaces in method signatures; adding encoding to Emailinfo