Greetings all, im having a bit of an issue with the mail function it seems that when using complete headers mail does not get through to yahoo addresses.
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: User<user@domain.com>\r\n";
$headers .= "Cc: user@domain.com\r\n";
$headers .= "Bcc: user@domain.com\r\n";
mail("$to" , $subject, $message, $headers, "-f $returnaddress");
Although supprisingly enough when you mail without headers at all gets through just fine...
mail($to, $subject, $message)
Although when i recieve a message without headers it looks like my webhost automatically apends a generic one... from apache user...etc. And this email gets through just fine to my yahoo address
So is it possible the spam filters are performing DNS lookups up my headers and seeing them as invalid or something??? They are indeed real email addresses and domain, infact its my email address they are set to bounce back to and be marked from. The headers should all be correct I just don't know why they are being thrown out as spam...
The posts on php.net lead me to believe that including the To address in $headers will result in that user recieving two emails so ive left it out although ive tried both methods and neigher worked. Also tried leaving out -f in the bounce back address and no dice...
does anyone have any tips on how to format the headers properly so the spam filters see them as ligitimate emails?
😕
Thanks guys,