how long will mulled wine last in the fridge?
Chances are it was spoiled within a couple of days. It's possible that if you really boiled it, you might extend its shelf life a bit, but oxidation generally does bad things to wine pretty quickly, and red wine suffers faster than white.
You might have made it last a little longer by decanting it into a wine bottle, then evacuating most of the air from with a system like VacuVin ($10 for the pump plus a couple of rubber stoppers with one-way bleeder valves at most wine shops). These are well worth the investment to save unfinished, open bottles of wine.