Reference : Hisn al-Muslim 226

وَعَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا: أنَّ رَجُلاً سَأَلَ النَّبِيَّ صلى الله عليه وسلم أيُّ الْإِسْلاَمِ خَيْرٌ قَالَ: (تُطْعِمُ الطَّعَامَ، وَتَقْرأُ السَّلاَمَ عَلَى مَنْ عَرَفْتَ وَمَنْ لَمْ تَعْرِفْ)
--

`Abdullah bin `Umar (RA) said: A man asked the Prophet (ﷺ), "What is the best act of Islam?" He said, "To feed others and to give greetings of Salam (peace) to those whom you know and to those whom you do not know. "

Reference:
Al-Bukhari, cf. Al-Asqalani, Fathul-Bari 1/55, Muslim 1/65.

Chapter: Excellence of spreading the Islamic greeting