'Until women's constitutional right to abortion in the USA was overturned by the Supreme Court in June 2922, no one gave much thought to Safe Haven laws.
These allow a mother to give up her new-born baby for adoption, at a designated site, anonymously and without risk of prosecution. 'Safe Haven' legislation first appeared in the US in 1999 in Texas, in response to a rise in the number of abandoned babies. Now it exists in every state. These laws were never intended as an alternative to abortion. But as the options for unhappily-pregnant women diminish, some are anticipating an increase in the number of babies left by desperate mothers in hospitals and specially designed Baby Boxes at local fire stations.'
(report from The BBC)
In earlier times, such drop-boxes, baby-hatches or niches were organised informally (if not always anonymously) by the Catholic Church. Here is one (no longer used) in my village of Caylus in SW France.