The Prophet (peace and blessings be upon him) said: "No man should spend the night with a woman in a house unless he is her husband or a mahram."