A washing machine comprising: - a housing, - a washing tub arranged inside the housing and having a front opening closable by means of a porthole door frontally hinged to the housing, - a basket arranged inside the washing tub and rotatable about a horizontal or inclined axis, wherein the basket defines a loading opening at the front opening of the washing tub, for loading and unloading the laundry to be washed, - a water loading system connectable to the water mains and in communication with the washing tub to load water in the washing tub, - a dispensing system for dispensing laundry treatment agents, said dispensing system comprising a plurality of tanks for containing said treatment agents, said plurality of tanks being positioned in the porthole door and the individual tanks being dimensioned to contain a sufficient volume of treatment agent for a plurality of washing cycles, characterized in that the dispensing system comprises a dosing pump, wherein said tanks are connected to an inlet opening of the dosing pump by means of one or more transfer ducts (44, 44') and one or more selection valves for selectively opening and interrupting the fluid connection between each of the tanks and the dosing pump, wherein the tanks are put in communication with the transfer duct by means of respective selection valves arranged in series in the transfer duct, wherein the transfer duct is connected to the dosing pump downstream of the selection valves, wherein each selection valve comprises: - a first inlet opening and an outlet opening, which connect the selection valve in the transfer duct, - a second inlet opening, which connects the selection valve to the respective tank, - an inner space, which puts the first and second inlet openings and the outlet opening in communication, - a shutter movable in: A) a passage position, in which it closes the second inlet opening and leaves the first inlet opening and the outlet opening open, to allow only a passage flow from the first inlet opening to the outlet opening and prevent an inlet flow from the second inlet opening to the outlet opening, B) an inlet position, in which it closes the first inlet opening and leaves the second inlet opening and the outlet opening open, to allow only the inlet flow and prevent the passage flow. - a housing, - a washing tub arranged inside the housing and having a front opening closable by means of a porthole door frontally hinged to the housing, - a basket arranged inside the washing tub and rotatable about a horizontal or inclined axis, wherein the basket defines a loading opening at the front opening of the washing tub, for loading and unloading the laundry to be washed, - a water loading system connectable to the water mains and in communication with the washing tub to load water in the washing tub, - a dispensing system for dispensing laundry treatment agents, said dispensing system comprising a plurality of tanks for containing said treatment agents, said plurality of tanks being positioned in the porthole door and the individual tanks being dimensioned to contain a sufficient volume of treatment agent for a plurality of washing cycles, wherein the tanks are put in communication with the transfer duct by means of respective selection valves arranged in series in the transfer duct, wherein the transfer duct is connected to the dosing pump downstream of the selection valves, wherein each selection valve comprises: - a first inlet opening and an outlet opening, which connect the selection valve in the transfer duct, - a second inlet opening, which connects the selection valve to the respective tank, - an inner space, which puts the first and second inlet openings and the outlet opening in communication, - a shutter movable in: A) a passage position, in which it closes the second inlet opening and leaves the first inlet opening and the outlet opening open, to allow only a passage flow from the first inlet opening to the outlet opening and prevent an inlet flow from the second inlet opening to the outlet opening, B) an inlet position, in which it closes the first inlet opening and leaves the second inlet opening and the outlet opening open, to allow only the inlet flow and prevent the passage flow. - a first inlet opening and an outlet opening, which connect the selection valve in the transfer duct, - a second inlet opening, which connects the selection valve to the respective tank, - an inner space, which puts the first and second inlet openings and the outlet opening in communication, - a shutter movable in: A) a passage position, in which it closes the second inlet opening and leaves the first inlet opening and the outlet opening open, to allow only a passage flow from the first inlet opening to the outlet opening and prevent an inlet flow from the second inlet opening to the outlet opening, B) an inlet position, in which it closes the first inlet opening and leaves the second inlet opening and the outlet opening open, to allow only the inlet flow and prevent the passage flow. A) a passage position, in which it closes the second inlet opening and leaves the first inlet opening and the outlet opening open, to allow only a passage flow from the first inlet opening to the outlet opening and prevent an inlet flow from the second inlet opening to the outlet opening, B) an inlet position, in which it closes the first inlet opening and leaves the second inlet opening and the outlet opening open, to allow only the inlet flow and prevent the passage flow.