An oven for heating an essentially liquid medium flowing through the oven, having an inlet into a channel located in said oven for the medium to be heated, in which channel there is arranged a separate pipe through which the medium to be heated flows and in which it is heated by means of electromagnetic radiation, wherein along the channel several heating units are arranged, each heating unit comprises an electromagnetic radiator containing a waveguide which guides the radiation to the channel through which the medium flows and which couples the radiation into that channel, wherein the heating units are substantially decoupled from one another by means of a decoupling diaphragm which is provided in the channel and which is arranged between two adjacent heating units or radiators essentially at right angles to the direction of flow, the pipe through which the medium flows passes through a passage in the decoupling diaphragm, the diaphragm thus also constituting a support for said pipe.