now using EventEmitter to trigger emails