I would recommend starting over but I don't know how much other stuff you have on the page. Is there any chance at all that something got corrupted when you working on the code?
Maybe try just a basic page with just your form and the Universal Email behavior. In other words, I would just try a new page - set up a form with just a few fields in it and then try the method to ensure that everything works properly. If that goes accordingly, then you will know for sure if the issue is bug related or something specific on your other page is problematic.
Your PHP code looks correct to me, so I don't think it is that.