I'm using Drupal 7.12 / Webform 3
How do I stop email from being sent upon a webform submission? I want to do this conditionally so I need to use a hook. I still want everything else to go through correctly (i.e. confirmation page, db entry for submission).
I see that there are these lines in function webform_client_form_submit($form, &$form_state)
if (!$is_draft && !$form_state['values']['details']['finished']) {
$submission = webform_get_submission($node->webform['nid'], $sid, TRUE);
webform_submission_send_mail($node, $submission);
}
How do I hook into that and stop it?