(covers information from several alternate timelines)
A text message (or TEXT MSG) was a typed communication sent from one computer panel to another. Starfleet ships enabled this ability, which was sometimes used when verbal contact could be dangerous, or was impossible.
In 2024, Pedro used his cellphone to send a text message to someone after he, Cristóbal Rios and several other deportees were rescued from ICE by Seven of Nine and Raffaela Musiker. (PIC: "Fly Me to the Moon")
In 2153, after his apparent execution at the hands of Triannon religious extremists who had taken over Enterprise (having falsely claimed that the transporter was, in fact, a disintegration device), Captain Jonathan Archer, needing to keep up the illusion that he was dead, contacted Doctor Phlox in sickbay from an access corridor at the bottom of the ship to ask him how to disable the explosives the extremists had in their bodies. (ENT: "Chosen Realm"
In an alternate 2255, at a bar in Riverside, Iowa, a woman used her cellphone to send a text message when Kirk got into a fistfight with some Starfleet cadets. (Star Trek)
In 2376, The Doctor modified his program to allow him to daydream. In one of these fantasies, he imagined participating in a briefing with several members of the USS Voyager crew regarding an upcoming away mission. During the briefing, Seven of Nine sent him a message via her PADD asking, "DINNER TONIGHT?" while smiling at him seductively and giving him a longing look. A bit later in the briefing, Lieutenant B'Elanna Torres said that the away mission was starting to look more dangerous than they thought and suggested that it might be a good idea to have The Doctor on the team. Seven, jealous, sent The Doctor another message in blinking red letters: "RESIST!", and then stated that she required his help in astrometrics. (VOY: "Tinker Tenor Doctor Spy")
In 2379, after Shinzon had destroyed the viewscreen of the USS Enterprise-E, Captain Jean-Luc Picard hailed him and sent a text message to Deanna Troi, who was at the helm, to ram the Scimitar on his command. (Star Trek Nemesis)