requiring app to be passed in to the require. creating mail "class"