Drain tray for solenoid valves of machines for coffee dispensing comprising: a base portion provided with at least one bottom from which transversely extends at least one side wall which terminates at the opposite end to the bottom with at least one engagement edge , the bottom and the side wall of the base portion defining at least one collection cavity for at least one fluid coming from a machine for coffee dispensing; characterized in that the drain tray further comprises: at least one cover portion provided with at least one upper wall from which transversely extends at least one side wall which terminates at the opposite end to the upper wall with at least one engagement edge arranged to engage the engagement edge of the base portion , the upper wall and the side wall of the cover portion defining at least one cover cavity , the cavities of collection and cover defining a respective housing compartment of the discharge tray ; at least one inlet connectable to a solenoid valve of a machine for coffee dispensing to allow the transit of a respective hot waste fluid (F1) coming from such solenoid valve towards the housing compartment of the drain tray ; at least one outlet to allow the outflow of at least one fluid coming from the respective machine for dispensing the coffee accumulated inside the collection cavity of the base portion of the drain tray ; at least one heat exchanger , in particular in indirect contact, preferably on surface, arranged inside the housing compartment of the drain tray and comprising at least one transit duct of a feeding fluid (F2) of the machine for coffee dispensing having at least one exchange portion wound in a coil and having two or more turns arranged to remain at least partially immersed in the hot waste fluid (F1) coming from at least one respective solenoid valve of the machine for coffee dispensing. at least one cover portion provided with at least one upper wall from which transversely extends at least one side wall which terminates at the opposite end to the upper wall with at least one engagement edge arranged to engage the engagement edge of the base portion , the upper wall and the side wall of the cover portion defining at least one cover cavity , the cavities of collection and cover defining a respective housing compartment of the discharge tray ; at least one inlet connectable to a solenoid valve of a machine for coffee dispensing to allow the transit of a respective hot waste fluid (F1) coming from such solenoid valve towards the housing compartment of the drain tray ; at least one outlet to allow the outflow of at least one fluid coming from the respective machine for dispensing the coffee accumulated inside the collection cavity of the base portion of the drain tray ; at least one heat exchanger , in particular in indirect contact, preferably on surface, arranged inside the housing compartment of the drain tray and comprising at least one transit duct of a feeding fluid (F2) of the machine for coffee dispensing having at least one exchange portion wound in a coil and having two or more turns arranged to remain at least partially immersed in the hot waste fluid (F1) coming from at least one respective solenoid valve of the machine for coffee dispensing. <EOS>