I couldn’t fix the e-mail problem in emoncms, so I went for another solution with Node-Red that seems to work. I still have to fine tune it, but I already get an e-mail if I exceed a peak.