My server uses the domain xxxx.com. I have a google Apps account associated with yy@xxxx.com. I've noticed recently that all the email sent by my server using PHP mail() from the address yy@xxxx.com to any email account managed by google (this includes gmail and google apps account) is not received. It used to be that it sometimes went into a spam folder, but now it just vanishes.
The problem does not affect the email addresses which are not run through google. I guess that google thinks that since it manages yy@xxxx.com, anything sent from somewhere else with this address is not legit. I've read here about folks having difficulties to send mail to yy@xxxx.com from their server when yy@xxxx.com is managed as a google apps, but my problem is more general: I cannot send to any account managed by google, e.g. zz@gmail.com
here's the basic php code:
$to = 'zz@gmail.com';
$subject = 'test';
$message = 'this is a test';
$headers = 'From: yy@xxxx.com' . "\n" .
'Reply-To: yy@xxxx.com' . "\n" .
'Return-Path: yy@xxxx.com';
mail($to, $subject, $message, $headers);
I've also added (with no change in results) "X-Mailer: PHP/" . phpversion()
Any suggestions ?