It is narrated from Sayyiduna Jabir (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) visited Umm Mubashshir al-Ansariyyah in a date-palm garden of hers. The Prophet (peace and blessings be upon him) asked her: "Who planted these date palms, a Muslim or a disbeliever?" She said: No, rather a Muslim. He (peace and blessings be upon him) said: "No Muslim plants a tree or sows a crop, and then a human being, an animal or anything else eats from it, except that it is a charity for him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المزارعة / 11750