function _webform_submission_spam_check in Webform 5
Same name and namespace in other branches
- 5.2 webform_submissions.inc \_webform_submission_spam_check()
- 6.3 includes/webform.submissions.inc \_webform_submission_spam_check()
- 6.2 webform_submissions.inc \_webform_submission_spam_check()
- 7.4 includes/webform.submissions.inc \_webform_submission_spam_check()
- 7.3 includes/webform.submissions.inc \_webform_submission_spam_check()
1 call to _webform_submission_spam_check()
File
- ./
webform.inc, line 252
Code
function _webform_submission_spam_check($to, $subject, $message, $from, $headers = array()) {
$headers = implode('\\n', $headers);
// Check if they are attempting to spam using a bcc or content type hack.
if (preg_match('/(b?cc\\s?:)|(content\\-type:)/i', $to . "\n" . $subject . "\n" . $from . "\n" . $headers)) {
return true;
// Possible spam attempt.
}
return false;
// Not spam.
}