While in general it would be appropriate to approach questions of ethics from a Jewish legal, that is, halakhic framework, in this case it really seems that this question can be answered with a ‘gut check.’ Prior to answering in that way let us suggest a number of halakhic issues that can inform this conversation.
There is a meta-framework (that some commentators even count as a commandment (mitzvah)) which can be called the ‘obligation to sanctify oneself at all times.’ This concept, being a holy person, and being a holy nation, teaches that even if an action is permitted by the letter of the law one should nonetheless seek to sanctify oneself while carrying it out or by abstaining from it. This can be taken to extremes and therefore it is incumbent on each of us to be measured and to push ourselves slightly beyond our comfort zone rather than coasting or, worse, tightening down on personal practice to the point of discomfort in the name of pursuing saintliness. A prime example: kosher food is permitted, in fact one can eat as much as they wish. But overeating or eating unhealthfully would not be fulfilling the commandment to sanctify oneself.
In our case one could (try to) argue that since there is no physical contact there is therefore no adultery taking place. This assumption is addressed in Jewish Law. The Talmud, distilled in the 16th century legal text Shulkan Arukh (Even HaEzer 25:10) mentions the prohibition of having relations with one’s spouse and thinking about somebody else. This is only one of the appropriate behaviors surrounding the sex act and what is most interesting about it is that the legislation addresses thought and not action. This is very similar to our case where the actions in question are ‘merely’ speech and other forms of communication.
Another analog is to be found in the realm of the prohibition of Yichud. Simply defined, Yichud is: being alone with a person with whom it would be prohibited to engage in sexual relations. This is a complex area and each case is considered carefully but the general principle is: if you are alone with someone who is forbidden to you sexually in a place where there is no likelihood of you being discovered by surprise, then you are in a state of Yichud - being-alone-together. The goal of this commandment is to avoid intimacies that may lead to inappropriate behaviors and suspicions.
Again, in our case there is no Yichud since the people involved are not in the same building, but there is a sense of privacy and intimacy that is leading to inappropriate relationships, notwithstanding the unlikelihood of actual sexual contact taking place.
But what is our gut saying? This is about a relationship problem. One party is somehow unfulfilled and the second party may or may not be aware of it. A person in a committed relationship should not feel the need to flirt with others. Flirting is a courtship ritual and is not an appropriate form of relationship for a person who is already in a committed relationship. Cheating comes in degrees - as slight as choosing to spend time with a friend instead of a lover and as extreme as having an affair that involves sexual contact. In between there are many many permutations and possibilities.
If the flirting in question is out of the gaze of the other half of the couple then this certainly has to be considered a form of indiscretion that should be resolved. If it is with the full knowledge of the partner then it is either spiteful or in some other way a marker of relationship problems that require openness and probably counseling to resolve.
One might want to take a look at Rabbi Shmuly Boteach's book "Kosher Adultery" one of the follow-ups to "Kosher Sex." In it he suggests that there are ways to take apparently illicit practices, too often parts of adulterous relationships, and put them into committed monogamous relationships to add spice and danger. (This is not an endorsement of the entire book, just a suggestion.)
Answered by: Rabbi Mordechai Rackover