Lots of was to say that some more formal than others. Some examples include:
I enjoyed meeting your wife.
I enjoyed getting acquainted with your wife.
I enjoyed making the acquaintance of your wife.
"Enjoyed" can be changed out for "it was a pleasure", "I'm glad to have...", I'm happy to have...", etc. Any suggestion that you slept with your interlocutor's wife would depend more on your body language, facial expression and the circumstances of the conversation than your choice of phrase.