It’s a cobble - I can’t speak php 'none good and had to write some python to parse the trap lines for keywords. Couldn’t find the php Libre uses to send email, I had to python the email as well. I don’t know if traps are standard, it may fail on other vendors. I’d be embarrassed to show Laf.
How about I work with florianbeer and, if it works for him, we can look at some ways to make it less embarrassing. Meanwhile, the snmptrap page should be changed, because it doesn’t work, not at all.