<p>A method of transferring heat from a first vapour stream (1) to a cooling fluid (2) includes the steps of: I) transferring heat from the first vapour stream (1) to a liquid stream (4); II) transferring heat from the liquid stream (4) to the cooling fluid (2), The heat transfer is preferably performed by a heat exchanger (200) which is provided with at least one thermoelectric generator (8) which has a hot junction (10) in thermal contact with the liquid (4) and a cold junction (9) in thermal contact with the cooling fluid (2).</p>