From: Rabbi Moshe Sofer
To: Unknown recipient
A destitute widow who was medically unable to nurse any of her children seeks to marry an elderly, childless rabbinic scholar during the twenty-four-month nursing period. The Chasam Sofer permits the marriage, provided the husband deposits funds for a wet-nurse through the child's twenty-fourth month and commits to the child's Torah education, given the confirmed medical danger of nursing and the dire circumstances facing the woman and her children.
Source: Shu"t Chasam Sofer EH I §30