It is probably the referrer checking in the code not passing.
I'd add debug code below the IF statement used to send the email... most likely you should adjust to use an IF statement that does not check the referrer.
If you post the IF statements from your code I can try to give you suggestions for how to fix the problem.
You should probably also remove onsubmit="" from your form tag.