The Prophet ﷺ said, "Do not prevent the female servants of Allah from attending the mosques of Allah, but let them go out without perfume."
حدثنا يحيى عن محمد بن عمرو قال حدثنا أبو سلمة
عن النبي ﷺ قال لا تمنعوا إماء الله مساجد الله وليخرجن تفلات
Its chain of transmission is sahih. Bukhari related it, 2/7, in the chapter on the adhan, on women going out to the mosques. Muslim related it similarly, 1/327, no. 442, in the chapter on prayer. Abu Dawud related it like Muslim, 1/155, no. 565. Ibn Majah related it, 1/8, no. 16, in the introduction. Ibn Khuzayma related it, 3/90, no. 1679. Ibn Hibban related it, 102, no. 326.