I hope this is the right place to ask this question...
I have a problem with emails I'm sending with mail() going straight into junk mail boxes. I posted a question yesterday about this, but I have more specifics on the problem today.
If I send an email with mail() to a test address, it goes straight to the Junk box. If I send a mail from my email program that exactly matches the script version, it's accepted and goes into the inbox. The only difference is the method of sending... mail() script vs an email program. Also, I found online and tried sending my email to spamcheck-marketingtools5@sitesell.net to test how 'spammy' it is and it scored a very low 1.8 (up to 5.0 is considered very clean).
I found this script online and the author said it would resolve this problem by making the email look like it came from an email program and not a script:
$spec_envelope = 1;
if($spec_envelope) {
$MP .= "/usr/sbin/sendmail -t -f $announce_from_email";
}
$fd = popen($MP,"w");
fputs($fd, "To: $announce_to_email\n");
fputs($fd, "From: $announce_from_name <$announce_from_email>\n");
fputs($fd, "Subject: $announce_subject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, $myheaders."\n\n");
fputs($fd, $body."\n");
pclose($fd);
...but it didn't work. The email still went directly into the Junk box, but at least this way I was able to set the Return-Path and get it to work correctly.
I'm somewhat new to using a script for emailing, and please forgive my ignorance and persistence in asking these questions. I just know there are more knowledgeable people out there and I hope one of them reads this and has a moment to help.
Thanks in advance,
Dan