Depending on the people, saying it through a text message is better than not saying it at all.
I contemplated on how to approach it with my wife and texting or email did come to mind.
I ultimately decided to do it via phone since we were not together and I knew there would be many questions. We talked about it ALOT afterwards. The message had to come out and the text for you opened your communication lines and now both are in the know with no secrets.
Best of luck moving forward.