حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا حَمَّادٌ، عَنْ مُحَمَّدِ بْنِ عَمْرٍو، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ لاَ تَمْنَعُوا إِمَاءَ اللَّهِ مَسَاجِدَ اللَّهِ وَلَكِنْ لِيَخْرُجْنَ وَهُنَّ تَفِلاَتٌ ‏"‏ ‏.‏
Translation
Narrated AbuHurayrah

Do not prevent the female servants of Allah from visiting the mosques of Allah, but they may go out (to the mosque) having no perfumed themselves.