A friend of mine put his horse in foal at the age of 21, the vet said she was in good condition and healthy, she had a foal about 10 years earlyer, it all went well.
My mare was 15, she didn't take to the first stallion, but we swapped to a second stallion and she took first time. She had no problems carrying the foal or whilst foaling. My baby is now 3. Good luck
Well reproductive ability starts to reduce from the age of 12ish onwards on an every decreasing plane, so ideally about 12/13 i would guess - not to say older is impossible...