Ouch. I guess the very first thing to do, after you have cleaned up the mess, is to test it and see if it still works. The little hole at the back doesn't run into the mechanics of the machine, it just goes out the back and perhaps all the mayonnaise went out there. (when you lift the bowl off you will see it on the base.)
There is information somewhere here on the forum about putting it either on its back or side, but I can't find it at the moment. I'm not sure which it is.