In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Allah’s Messenger [peace and blessings of Allāh be upon him] said, “He does not thank Allāh, he who does not thank the People”. [(1)]
One of the Islamic mannerisms that is befitting for a Muslim to adhere to is to show gratitude to the one who was good to you; any type of good, whether it was by (sharing) knowledge or commanding good and forbidding evil, or by doing good in fulfilling a person’s needs.
[جزاك الله خيرا – May Allāh reward you with good]
If you said that to him, indeed you have done your utmost in praising and thanking him. As for the one who does good to you and you didn’t thank him, or mention him with good, then this is a blessing to which a person has shown ingratitude. Oh, Muslim! It is not from Islamic manners to reject some good that someone – whether close to you or not – has done to you. This is the meaning of the hadīth, “Whoever does not thank the people has not thanked Allāh”. Allāh is the bestower of blessings, The Most Great, The one who confers good (to His servants), the Generous. The people likewise are good-doers within the limits of their ability. So, whoever receives good from the people, it is from Islamic etiquettes to thank them for being good to him – whatever type of goodness it may be. Allah’s Messenger said, “Allāh has prescribed Ihsan in everything”. [(2)] And one of the mistakes committed is that someone close to you or not close to you does good to you and you do not thank him for his goodness nor mention him with good in order that supplication can be made for him.
An Excerpt from “Awn Al-Ahad As-Samad Sharh Al-Adab Al-Mufrad- By Al-Allaamah Zayd Ibn Hādi Al-Madkhalī [may Allah have mercy upon him]. Page 242. slightly paraphrased
(1) Abū Dāwud- hadith no.4811, At-Tirmidhī- hadith no. 1954, Ahmad- hadith no.7939. Saheeh – Authenticated by Al-Albāni
(2) Saheeh Muslim Hadith no. 1955