Once, when the Buddha was staying at the Nigrodhārāma in Kapilavatthu, Mahāpajāpatī Gotamī offered him two lengths of cloth woven by herself on her own loom. The Buddha asked her to present her gift to the Order of monks rather than to him, for she would thereby gain greater merit. He then proceeded to describe the different kinds of recipients of gifts, the different kinds of givers and the degrees of purity in gifts (M.iii.253 ff).
The sutta is found word for word in the Sūtrālaṅkāra (Sylvan Levi: JA.1908, xx.99) and is often quoted, e.g., Mil.258; MA.i.152; also included in anthologies — e.g., the Suttasaṅgaha.