Every time a user submits the form (show summary, request price, regular submission), an email will be sent with the captured email address. Add the following php code to your functions.php file (or somewhere else in your theme):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
add_filter("ezfc_prepare_submission_data", "ezfc_capture_emails_f38912", 1); function ezfc_capture_emails_f38912($submission_data) { if (empty($submission_data["raw_values"]) || !is_array($submission_data["raw_values"])) return $submission_data; foreach ($submission_data["raw_values"] as $value) { if (filter_var($value, FILTER_VALIDATE_EMAIL)) { // email found mail("your@email.com", "Email capture", "Email captured: {$value}"); } } return $submission_data; } |