The following Q&A's are extracted from DinOnline.org which explain the proper and improper online interactions between opposite genders via texting and/or email. Now some might claim that texting is not similar to talking via voice. See the answer given in the first situation below. Does remotely texting between a man and a woman violate the negative prohibition of Yichud (seclusion)? This is addressed in the second question.
For the final p'sak, consult your trusted competent Orthodox Rav.