I’ve had a couple instances of “not able to contact mail server” on one or another of my iCloud accounts. I have two. It’s been intermittent and clears in a few minutes. It’s occurred mostly on my phone, I believe, not my ipad but I’ve determined in the past that they access iCloud through different servers so an issue on one won’t necessarily present on the other, even on the same account. I’m chalking this up to some iCloud issues related to ios 18, as I wasn’t having any of the odd manifestations I’m seeing on ios 17.