Dec 6th, 2011, 1:15 PM
(Dec 6th, 2011, 10:35 AM)Ben Wrote: Hi Carpetman,
Cool! No problem, here's how you can trigger it manually.
The emails are "normally" triggered in the ft_finalize_submission() function, called when the submission is finally marked as complete & ready to show up in the interface. But in your case, you can just call the email function manually. Here's some example code:
PHP Code:// your insert code here
mysql_query(" ... ");
// get the unique Submission ID that you just inserted
$submission_id = mysql_insert_id();
// now send whatever emails are associated with this event ("on submission") for this form
$form_id = 1; // you'll need to update this for your own form ID
ft_send_emails("on_submission", $form_id, $submission_id);
Hope this helps!
- Ben
OMG You are a genious!! Many thanks - i have many other uses for this so it's going to be a late night in front of the computer

I'm guessing the ft_send_emails("on_submission", $form_id, $submission_id); is caling the function so i need to declare it before? and i'm guessing the function is somewhere in my formtools directory.
I'll give it a go and tell you how it works.
Once again, many thanks for this.