20
I don't want to teach hacking - but here's a clue.
Most "script-kiddies" do not use your form. They know what the payload looks like, and send the HTTP transaction through some other type of script (php maybe) or
programatically to get the data sent.
What it really comes down to is two fold. Any developer developing a form should do as much checking as possible. For the most part, this would require something like javascript to do real-time. Then, when validating post data, you must be able to validate each field for "real" values and be able to stop processing when errors are found.
Another key to hacking any form is understanding that the php processor can be overloaded. So, if you see someone hit your site many many times within the same minute, that is what they are trying to do. Cause an overflow.
As you examine the POST payload I sent you, pay attention to the hex codes included and inserted between command functions. Anything that slips through testing will trigger your phpmailer to do exactly as told.
Another example is taking the payload I gave you, and converting all characters to chr() type hex codes.
Ultimately, these types of form injections are harmless unless your code is really bad at validation. Most of these scripts that are run are posted on the onzyou type sites. Sometimes theya re way out of date. Be aware, once they find a hole, they will start picking to ultimately rootkit your box and own you! Good luck, it's a great learning experience, but nothing more.