It is narrated from Sayyiduna Zayd bin Khalid al-Juhani (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When the slave woman of one of you commits adultery, let him flog her; then if she commits adultery, let him flog her; then if she commits adultery, let him flog her; then if she commits adultery, let him sell her, even if for a rope of hair."
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 5188