consolodate email code into abstract class
e-mail refactored