A beverage vending machine comprising a milk supply circuit comprising: - a cold milk tank, - a variable speed milk pump having a suction side fluidically connected to the cold milk tank through a milk suction duct to draw cold milk out of the milk tank, and to an air source through an air supply duct along which an air solenoid valve is arranged to cause the milk pump to be selectively supplied with air to froth the cold milk drawn out of the milk tank, and a delivery side through which smooth or frothed cold milk is delivered, depending on whether the milk pump has been supplied with air in addition to cold milk, - a steam generator to produce steam, - a milk heater having a milk inlet fluidically connected to the delivery side of the milk pump through a milk delivered supply duct to receive cold milk, enriched with air or not, a steam inlet fluidically connected to an outlet of the steam generator through a steam supply duct along which a steam solenoid valve is arranged to cause the milk heater to be selectively supplied also with steam to heat the cold milk, enriched with air or not, received from the milk pump, and a milk outlet through which cold or hot, smooth or frothed milk is delivered, depending on whether the milk pump has been supplied with air in addition to cold milk, and the milk heater has been supplied with steam; and - an electronic milk control unit electrically connected to the milk pump and the air solenoid valve to control operation of the milk pump and of the air solenoid valve to cause the milk supply circuit to deliver smooth or frothed, hot or cold milk; characterized in that the electronic milk control unit is further configured to: - determine milk-related quantities comprising: ∘ type of cold milk in the cold milk tank, and ∘ temperature of the cold milk in the cold milk tank, and - control operation of the milk pump and of the air solenoid valve based on the determined milk-related quantities. - a cold milk tank, - a variable speed milk pump having a suction side fluidically connected to the cold milk tank through a milk suction duct to draw cold milk out of the milk tank, and to an air source through an air supply duct along which an air solenoid valve is arranged to cause the milk pump to be selectively supplied with air to froth the cold milk drawn out of the milk tank, and a delivery side through which smooth or frothed cold milk is delivered, depending on whether the milk pump has been supplied with air in addition to cold milk, - a steam generator to produce steam, - a milk heater having a milk inlet fluidically connected to the delivery side of the milk pump through a milk delivered supply duct to receive cold milk, enriched with air or not, a steam inlet fluidically connected to an outlet of the steam generator through a steam supply duct along which a steam solenoid valve is arranged to cause the milk heater to be selectively supplied also with steam to heat the cold milk, enriched with air or not, received from the milk pump, and a milk outlet through which cold or hot, smooth or frothed milk is delivered, depending on whether the milk pump has been supplied with air in addition to cold milk, and the milk heater has been supplied with steam; and - an electronic milk control unit electrically connected to the milk pump and the air solenoid valve to control operation of the milk pump and of the air solenoid valve to cause the milk supply circuit to deliver smooth or frothed, hot or cold milk; - determine milk-related quantities comprising: ∘ type of cold milk in the cold milk tank, and ∘ temperature of the cold milk in the cold milk tank, and ∘ type of cold milk in the cold milk tank, and ∘ temperature of the cold milk in the cold milk tank, and - control operation of the milk pump and of the air solenoid valve based on the determined milk-related quantities.