Jump to content


This topic is now archived and is closed to further replies.


mail() and spam filters

Recommended Posts

I'm writing a solution that relies on system-generated emails for customer communications. Our company has recently switched webhosts, and I'm noticing that I no longer receive auto-generated email triggered by these scripts. To debug, I Carbon Copy: my gmail account and sure enough, it shows up in gmail, but not through our new host's email accounts (network solutions). I blame this on their built-in spam filter software (symantec brightmail).

The quick fix would be to ask N.S. to disable the spam filter for us, but that won't solve the problem for any number of our customers who either use N.S. or have a comparable filter in place. I'm wondering if anyone can give me some advice on how to overcome this issue, certainly every web-based business out there needs to use system-generated emails, what are they doing differently?

Thanks for your help.


Share this post

Link to post
Share on other sites
What headers (arg #4, mail() function) are you using when you send your email? I ran into a similar problem a while back where I wasn't sending headers and a spam filter was flagging the messages as spam. Can you post the code where you call mail().

Share this post

Link to post
Share on other sites
I'm using the libmail class, (http://lwest.free.fr/doc/php/lib/Mail/) rather than paste that entire file along with my code I will give you the printout it gives me on the confirmation page and that will show you all the headers.

Mail was sent:

To: Curt@7cpco.com
From: joe@schmo.com <<fake, but will be filed out by customer through form
X-Priority: 4 (Low)
CC: Jennie@7cpco.com
BCC: curtis.branum@gmail.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Php/libMailv1.3

Thanks for your help!

Share this post

Link to post
Share on other sites
I downloaded the LibMail class to have a look at. what _will suggested earlier might work... open up libmail.php, and comment out line 333(assuming you are using the newest version of libmail):

//$this->xheaders["X-Mailer"] = "Php/libMailv1.3";

See if that works

Share this post

Link to post
Share on other sites
Additionally, it might be worth a try to see if the spam filters would treat your email differently if you made your X-Mailer header mimic that of say, Outlook, Eudora or Thunderbird.

Share this post

Link to post
Share on other sites
i use the X-mailer myself and this is not the problem as long as it's real, faking it would be a risky move if you ask me. Was it the FULL header you posted there ?
I use IE express (dont say Anything...please) as email client, and this states different warnings on the x-spam status.
I managed to get this down to -0.5 when sending out from php5 through smtp, havent tested it on hotmail, but yahoo accepts every mail to inbox, not bulk
To: [sensored out]@[sensored out].no
Subject: [sensored out]
X-Message-Key: IA==
From: [sensored out] <[sensored out]@[sensored out].no>
Reply-To: [sensored out] <[sensored out]@[sensored out].no>
X-Mailer: PHP v5.1.4
Date: Thu, 11 May 2006 13:55:42 +0200
Message-ID: <200605111355429PMYBYQ7N3UY@www.[sensored out].no>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: multipart/related; boundary="cdaa02e008ad65fa30a03fbb1c294ee5"
X-Spam-Status: No, hits=-0.5 required=4.0
X-Spam-Report: -0.5 hits, 4.0 required;
    * -0.5 ALL_TRUSTED            Passed through trusted hosts only via SMTP
X-Virus-Scanned: by moam (http://www.moam.net/)
X-Moam-Version: 0.92

i fixed proper message ID, encoding, content type, mime-boundary etc. to fix my problems.

Share this post

Link to post
Share on other sites
Oh, I agree that faking an X-Mailer and using it in a production environment would be a bad idea. I am just interested in seeing how the spam filters react to the same message coming from different clients.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.