converted emailer to instance class (closes #19)