Our first instinct when these ethical / moral dilemmas are raised, either in our personal life with family or friends or when we are made aware of it through the media, is to ask, " what would I have done" or "what would I do" in this situation and there are are several points which immediately spring to mind.
Firstly, how often, who with and the degree of "sexiness". Also how long has it been going on. If you are the person who has been cheated on as it were, did you find out or were you told by your partner. Personally I think it raises issues of trust either way the discovery is made. If you are in a committed sexual relationship with your partner then naturally you'd consider texts of a personal and intimate nature to be shared with you and you alone and if another person was communicating with your partner in this way, it necessarily makes you question the level of trust and honesty you have in your relationship. It will also make you question the perceptions you both have of your relationship and whether this is considered acceptable.
Secondly, if you're the one sending / receiving the texts, do you consider it appropriate, do you share them with your partner and if not how would you feel if your partner happened to discover them?
The third point is to do with flirting. How many of us flirt on a daily basis? either with people we meet in public situations, the barrista at our regular coffee shop for example, work colleagues etc. Would we flirt if our partner was able to witness our comments and more importantly, our body language? Or do we flirt openly because we are sending specific messages with our body language, either openly or more reserved. If we are flirting in situations with strangers, on a train for example, is it because we'll never see that person again and it makes us feel attractive? I have a work colleague who regularly regales me with stories of men she's encountered in passing when working away and how smart, pretty, intelligent they apparently found her, I'm not sure how much of it is true or embellished due to her own insecurities or how much of it she wishes were true as I know she is not particularly happily married. To be fair, I haven't asked and if it makes her feel good then I certainly won't judge; we all want to feel beautiful, both inside and out.
And that probably is what it all comes down to, no matter what our situation is at home, happy, unhappy, indifferent, we all enjoy those sensations,feelings, that frission when someone really looks at us and takes the time to strike up a conversation and are interested enough to prolong it for however long the situation arises.