Ibn Daylami said, I came to Abdullah bin Amr and asked him, "Abdullah bin Amr, did you hear the Messenger of Allah ﷺ mention anything concerning wine?"He replied, "Yes, I heard the Messenger of Allah ﷺ say, 'No man from my nation drinks wine and has his prayer accepted by Allah for forty days.'"
أخبرنا علي بن حجر قال أنبأنا عثمان بن حصن بن علاق دمشقي قال حدثنا عروة بن رويم أن ابن الديلمي ركب يطلب
ابن الديلمي فدخلت عليه فقلت هل سمعت يا عبد الله بن عمرو رسول الله ﷺ ذكر شأن الخمر بشيء فقال نعم سمعت رسول الله ﷺ يقول لا يشرب الخمر رجل من أمتي فيقبل الله منه صلاة أربعين يوما
[Its chain of transmission is sahih] It is also found in Al-Kubra, hadith no. 5174, and Ibn Khuzayma graded it sahih, hadith no. 939. Ibn Majah narrated it, hadith no. 3377, through another route from Ibn Daylami with the same content. See the coming hadith no. 5673.