Guest User

Untitled

a guest
Dec 7th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. if (!$is_draft && !$form_state['values']['details']['finished']) {
  2. $submission = webform_get_submission($node->webform['nid'], $sid, TRUE);
  3. webform_submission_send_mail($node, $submission);
  4. }
  5.  
  6. function MODULE_mail_alter(&$message) {
  7. //You can do your conditional check here and depending on that
  8. //you can set the value of $message['send'] to false to stop the mail from being sent.
  9. //place the line below inside conditional loop, or else it'll stop every mail from being sent ;-)
  10. $message['send'] = FALSE;
  11. }
  12.  
  13. yoursite.com/node/XXX/webform/emails
  14.  
  15. foreach ($node->webform['emails'] as $key => $email) {
  16. $node->webform['emails'][$key]['status'] = 1 // or 0 to disable;
  17. }
Add Comment
Please, Sign In to add comment