Monthly Archives: August 2019

google.com: XXX.XXX.XXX.XXX is neither permitted nor denied by best guess record for domain of apache@

If you are using mail() to send an email, with PHP, and you are getting the following error…

spf=neutral (google.com: 69.55.XXX.XXX is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Return-Path: <[email protected]>

You can force the ‘mailfrom’ by adding -f[email protected], after the headers.

$send = mail($to, $subject, $message, implode("\r\n", $headers), '-f'.$from);