The oil pan collects used oil that has already lubricated the BMW E39 engine. The gasket fits between the mating surfaces of the oil pan and vehicle. If the gasket is torn or worn out, used oil will leak below the car. Replacing the gasket on a BMW E39 is not that difficult and can be done in a single afternoon, although the task does take a lot of muscle, as the oil pan has many bolts that will need to be removed and the oil pan itself has to come off the BMW.
Raise the BMW with your car jack and place 2 jack stands below the vehicle to keep it raised and stable.
Locate the oil pan--a large, grey box below the engine--and drain the oil from it into a drain pan placed below the drain plug on the oil pan. Clean off any oil that gets on you with soap and water.
Remove the six bolts holding the oil pan to the vehicle using your socket wrench. This part may take some muscle, because the bolts can become quite stuck in their place.
Wedge the flat end of your large, flathead screwdriver between the mating surfaces of the oil pan and the vehicle. Strike the butt with the mallet to pry off that section of the oil pan. Continue to do this all around the pan to remove it from the vehicle.
Take off the old gasket and clean off the surface it was on. Lay on the new gasket and reinstall the oil pan using the mounting bolts.
Drain the oil after running the vehicle for a few minutes so the oil is warm and drains faster and completely from the pan.