moved emailer to api