-killing monsters (and not just fighting them) is the only way to gain exp for combat related skills
-every monster is worth a fixed ammount of exp
-the exp are divided up evenly on all players that helped defeating the monster
-the exp for players that helped defeating the monster without being in the party of the first attacker (killstealers) is deleted
-the exp each player gets is divided up evenly on all skills that he used in the combat
-when the challenge rating of the monster is higher than the level of the skill the exp that skill receives is divided by (Challenge Rating / Skill Level)
but the question that still remains is how to deal with defensive magic like healing, buffing and status effect recovery. i would suggest to treat these skills like crafting skills. in the end it is not that different if you cure a wound or repair an armor or if you forge a shield of metal with your hammer or if you forge a shield of magic with your wand.
i think that it would be necessary to separate offensive magic skills from defensive magic skills in that case. that way we needn't deal with balancing the system for combat exp and the system for crafting exp. when we want to stick to the "one skill for each element" idea then there are two ways to archive that.
a) all magic elements have either only offensive spells or only defensive spells
b) each magic element has two separate skill levels. one for offensive magic (could for example be called "fire wizardry" or "black fire magic") and one for defensive magic ("fire sorcery" or "white fire magic").