I have created a custom submit based on the below module:
It went all hunky dory on my dev machine but when moved to our staging environment it started submitting twice and thus sending two emails. I added some logging to my custom code and it is definitely a submit of the same form as the SessionId, TemplateId etc. are all identical.
During my frantic googling I came across the below question on stack exchange which looks like the same problem but there wasn't an answer given.
The bit I am missing is what happens between the form being submitted and it hitting the execute method on my submit action. Any pointers on where I can troubleshoot around that would be great.
I am stumped with the above so any help would be greatly appreciated. Please let me know if any more information is needed.
P.s This is my first time asking a question on StackExchange so please let me know if my question could have been clearer and/or more helpful.