Mayonnaise is the emulsion of oil, egg yolks, vinegar and lemon juice, as well as other chemicals and preservatives. When mayonnaise was first made in homes, it contained raw eggs and a lack of preservatives to stave off harmful bacteria from growing quickly. Common commercial mayonnaise contains a high amount of acid, which aids in the fight against bacteria. Dangers do exist when heating mayonnaise, primarily in the combination of how you heat the mayonnaise and how long the process takes.
Cooking with mayonnaise creates and expands upon many recipes. By removing the mayonnaise from your refrigerator, you begin the process of heating the mayonnaise. Leaving mayonnaise at room temperature for a short amount of time does not actively effect your health from harmful bacteria. However, leaving mayonnaise out for an extended period of time, an hour or more, increases your chance of growing harmful bacteria in your mayonnaise.
Your microwave is a great source for heating foods quickly. If you have a recipe that requires heating mayonnaise in the microwave, it is safe to do so. However, do not leave the food out for a long period of time. If you're heating your mayonnaise to complete a meal or recipe, add the mayonnaise shortly after heating it and serve.
Like the microwave, a conventional oven is used to heat or bake foods. If you have a recipe that calls for adding mayonnaise to a dish, which then must be put in your conventional oven, you can rest easy. It is safe to heat mayonnaise in your conventional oven. However, cook your food at the correct temperature, and cook the food thoroughly. This is one of the safer methods of heating mayonnaise.
Nearly identical to the conventional oven, your toaster oven acts as a mini version of a stove. Heating mayonnaise in your toaster oven is safe, so long as it is cooked at the correct temperature. Prior to cooking your food, have the correct temperature selected. Despite its reputation, mayonnaise has many preservatives that protect other foods from spoiling, including itself. The danger exists when you don't eat the food quickly enough, allowing bacteria to grow when the food is heated.