updated logic for return on email jobs