Sunan Ibn Majah, Volume 5, Book 36, Hadith 4002 (DarusSalam)

It was narrated that Abu Hurairah met a woman who was wearing perfume and heading for the mosque. He said: “O slavewoman of the Compeller, where are you headed?” She said: “To the mosque.” He said: “And have you put on perfume for that?” She said: “Yes.” He said: “I heard the Messenger of Allah say: ‘Any woman who puts on perfume then goes out to the mosque, no prayer will be accepted from her until she takes a bath.’”

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ عَاصِمٍ، عَنْ مَوْلَى أَبِي رُهْمٍ، - وَاسْمُهُ عُبَيْدٌ - أَنَّ أَبَا هُرَيْرَةَ، لَقِيَ امْرَأَةً مُتَطَيِّبَةً تُرِيدُ الْمَسْجِدَ فَقَالَ يَا أَمَةَ الْجَبَّارِ أَيْنَ تُرِيدِينَ قَالَتِ الْمَسْجِدَ قَالَ وَلَهُ تَطَيَّبْتِ قَالَتْ نَعَمْ ‏.‏ قَالَ فَإِنِّي سَمِعْتُ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ يَقُولُ ‏ "‏ أَيُّمَا امْرَأَةٍ تَطَيَّبَتْ ثُمَّ خَرَجَتْ إِلَى الْمَسْجِدِ لَمْ تُقْبَلْ لَهَا صَلاَةٌ حَتَّى تَغْتَسِلَ ‏" ‏ ‏.‏

sunnah.com