I know this is plastered all over the net... But i've tried a lot of solutions and it just wont seem to work. My SMTP mail first came through as junk, and now just comes into my inbox, but with a warning notice saying the email didnt pass the fraud tests..
So im using Optus's SMTP server (mail.optusnet.com.au), and for the "sendmail_from" i have my email address..
for the actual mail, i have this:
$message = 'Hello, $user;
$to = 'nobody@example.com';
$subject = 'Welcome';
$headers = 'From: myemail@hotmail.com' . "\r\n" .
'Reply-To: myemail@hotmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail('myemail@hotmail.com', $subject, $message, $headers);
Any ideas guys?
Thanks,
Adam
Most of E-Mail providers check every received email to decide whether it's a spam or not. For example , if you send an email as myemail@hotmail.com
from mail.optusnet.com.au
, it will not pass the test and will be put under junk category. In my experience, Yahoo! and Hotmail usually put every email with X-Mailer: PHP
header as junk!
For more information take a look at Sender Policy Framework.
About comment:
If you take a look at your received email, you will see something like this:
Received-SPF: neutral (google.com: x.x.x.x is neither permitted nor denied by best guess record for domain of email@mail.optusnet.com.au) client-ip=x.x.x.x;
it tells client that this email at least is NOT trying to show itself as someone else, so it goes to your inbox. but If you use something@hotmail.com
, since hotmail.com
has a valid IP and it's different from mail.optusnet.com.au
, so it goes to your junk folder.