How to get getCurrentCart(); to work?

Im trying to use this function to send the cart data to email but cant make it work , could anyone tell me how to use this function in code and how to send the data by email afterwards .