function spamTest($header){
$output_array = preg_grep('/^(X-Spam-Score:)\s([-+]?\d{1,3}\.\d)?/i', explode("\n", $header));
list($xSpamScore, $score) = explode(": ", $output_array[array_key_first($output_array)]);
return ($score < 5);
}
I ran the email header into this and it seems to work.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.