Abd al-Rahman bin al-Harith bin Abi Ubayd, one of the shaykhs of Kutha and a freed slave of Abu Ruhm al-Ghifari, narrates from his grandfather, who said: I came out of the mosque with Abu Hurayrah (may Allah be pleased with him) in the forenoon, and we met a woman who was wearing perfume; I had never smelt a fragrance like it before. Abu Hurayrah (may Allah be pleased with him) greeted her with salam, and she returned it. Abu Hurayrah (may Allah be pleased with him) asked: Where are you heading? She said: To the mosque. Abu Hurayrah (may Allah be pleased with him) asked: Why have you put on perfume? She said: For the mosque. Abu Hurayrah (may Allah be pleased with him) said: By Allah? She said: Yes, by Allah! Abu Hurayrah (may Allah be pleased with him) said: By Allah? And the woman too said: By Allah! Then Abu Hurayrah (may Allah be pleased with him) said: I heard my beloved, Abu al-Qasim (peace and blessings be upon him), say: "The prayer of a woman who uses perfume for anyone other than her husband will not be accepted until she bathes (from it) as she bathes from major ritual impurity (janabah)." So go and bathe from it, then come back and pray.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5376