Genuine feedback: I'm someone who appreciates direct honesty, but the message comes off as very passive aggressive, not honest or direct at all.
@All2Well did say "You run the risk of them just dumping their child on you whenever they feel like it, you need to be honest but nice." So I do think the message was intended to have passive aggressive elements ("please don't send your child round like that again" – only it doesn't actually say that and just beats around the bush in an accusatory way).
"Will have a chat with her later and explain she needs to ask me first as we might not have been in and I'd hate either of them to be disappointed" – why would she need/want to know what you're chatting with DD about and why? Why should she care about what your DD gets up to, and what your home set up is – unless it involves her somehow? It sounds like you're indirectly telling the mother about the potential inconvenience her own child's presence could have caused, by claiming you would talk to DD about that.
Essentially there's no direct request / conclusion to do with the recipient parent (e.g. for the parent to check with OP in future) in the message. It's just a long random ramble about why OP's DD shouldn't randomly invite others home, and how it's lucky that OP could take the child in today ("luckily our plans today can be flexible"). The message is "be guilty and grateful".
UNLESS you have a request for her like "please check with me in future", then the background / reason (about the inconvenience) is important. But just directly and nicely tell her that it might be inconvenient as you might not be home. Don't tell her that under the indirect guise of "I've had a chat with my DD about the inconvenience".
Also, I think it's arguably fine to honestly say you weren't expecting her child, but you can do that without talking about why DD shouldn't invite random children home in the long term etc. If you go on about how DD's actions were a mistake in such a long message in such a faux tinkly laugh manner, it makes the reader wonder what point you're trying to make about their child's presence in your home.
Wow, I'm pretty gobsmacked that this is how the text reads.
Firstly, I don't do the passive aggressive, faux tinkly laugh thing at all...I didn't think for a second that sort of reading would be put on it. I say what I mean, no intended subtext.
I think where I attempted to put the responsiblity on OP's DD and tried to reassure that she'll be spoken to to avoid embarrassing situations like this in the future, it's come across as aggressive rather than what I intended. I.e please don't feel bad, it's DDs error and it won't happen again as I can assure you she'll be spoken to.
It's true, I did infer they might make a nuisance of themselves in the future in my opening sentence but the text was never intended to make someone feel bad or guilty. My brain has literally exploded that someone would think that! All the luckily our plans can be flexible stuff etc to me was intended to say "please don't feel bad, we don't have to be anywhere so don't rush to pick her up" and letting them know, if they did just drop her off without an arrangement that they might show up to an empty house and I wouldn't want their DD to be disappointed or sad.
Anyway, like I said, I accepted I got it wrong and honestly my brain hurts and I can feel myself starting to feel shit about myself and overanalysing my personality so I'll bow out.
Glad it's all sorted OP and that the girls had a good time. I'm so sorry for the upset I caused and if I've gave you the complete wrong advice.