عَنْ فَاطِمَةَ بِنْتِ رَسُولِ اللَّهِ رَضِيَ اللَّهُ عَنْهَا وَأَرْضَاهَا قَالَتْ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ إِذَا دَخَلَ الْمَسْجِدَ صَلَّى عَلَى مُحَمَّدٍ وَسَلَّمَ (وَفِي رِوَايَةٍ: قَالَ: ((بِسْمِ اللَّهِ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ))) وَقَالَ: ((اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي وَافْتَحْ لِي أَبْوَابَ رَحْمَتِكَ))، وَإِذَا خَرَجَ صَلَّى عَلَى مُحَمَّدٍ وَسَلَّمَ (وَفِي رِوَايَةٍ قَالَ: ((بِسْمِ اللَّهِ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ)) ثُمَّ قَالَ: ((اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي وَافْتَحْ لِي أَبْوَابَ فَضْلِكَ)))
It is narrated from Sayyidah Fatimah, the daughter of the Messenger of Allah, may Allah be pleased with her and grant her satisfaction, that when the Messenger of Allah, peace and blessings be upon him, would enter the mosque, he would send blessings and peace upon Muhammad, peace and blessings be upon him, and in one narration, he would recite this supplication: "Bismillah, was-salamu ‘ala Rasulillah" (In the name of Allah, and peace be upon the Messenger of Allah), and then he would recite: "Allahumma ighfir li dhunubi waftah li abwaba rahmatik." (O Allah! Forgive my sins and open for me the doors of Your mercy.) And when he, peace and blessings be upon him, would leave, he would send blessings and peace upon Muhammad, peace and blessings be upon him, and in one narration, he would say: "Bismillah, was-salamu ‘ala Rasulillah," and then recite this supplication: "Allahumma ighfir li dhunubi waftah li abwaba fadlik." (O Allah! Forgive my sins and open for me the doors of Your bounty.)