Oh how sad for her
I don't really know if there would be a right thing to say, but I would think that saying congratulations and that the baby is gorgeous and so very loved and special would be wonderful for her to hear. Other than that personally I would offer any support that I could, like being a friendly ear at the other end of the phone if she ever needs it. Some kind of keepsake would also be lovely, perhaps ask her if she is aware of heartfelt - a photographic group which is for exactly this kind of situation if she would like some photos of her baby.
Bookmarks