All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
In principle, donations should be spent in the specific field that the donor intended. If nothing was intended by the donor but the authority that collects donations was collecting them for a declared purpose, then the donations should be given only for these purposes. If the donations were given for maintenance of the mosque, then they should only be spent in this as these donations take the same ruling as endowments. However, if donations were taken for general purposes, then any poor person who is in need should take from them.