I'm a few years older than my closest male friend, and extremely plain. Like a pp, I'm hardly a trophy female friend. (DH's closest female friend for years was fifteen years older than him, and they'd met at an awful team-building away day when the company he worked for bought out her company -- unfortunately she died of cancer in her late 50s. I never liked her very much, but DH valued her, and was very sad when she became ill and it was clear she couldn't recover.)
I don't 'continually message' anyone, of either sex, but I certainly see my geographically-nearest male friend regularly. (Others are harder to see as they live at a distance.) I'm married. He's divorced and dating. Our respective relationship statuses have made no difference to our friendship. I have other male friends where our friendship has outlasted more than one of their marriages. I'm not 'risking' anything, and I'm certainly not naive. It's possible to value friendships as well as your marriage.
But then again, I'd hate to live in the world of paranoia and suspicion that so many Mners appear to live in. Not just with opposite-sex friendships, but the posters who see 'cliques' and 'exclusions' everywhere, and approach the school run, workplace, or hen party invitations as some kind of war zone. I assume that attitude is what feeds the paranoia about friendships.
I'd suggest you try an opposite-sex friendship. It might cut down on the loneliness so many Mners complain of, if you don't disregard half the human race as potential friends, and you'll be amazed how easy it is not to develop a roaring attraction to a perfectly ordinary, nice man.