I always vaccinated my mares 30 days before foaling due date so that the colostrum passed immunity to the foals. I also kept the mares on their worming schedule during the entire pregnancy, and they had their regular vaccine twice a year and I would time it so that the second one was the one 30 days before foaling date. One of the causes of foal diarrhea (ONE of them) can be worms passed to the foal in the milk, so my mares received a dose of wormer the day they foaled. I had 40 foals born here, never lost a mare, never lost a foal, and the foals were strong and healthy.
Also the mares!