Avoding Spam Detection

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lamia
Forum Newbie
Posts: 11
Joined: Sun Jun 19, 2005 2:21 am

Avoding Spam Detection

Post by lamia »

Hi, I noticed that everytime I send an e-mail using php native function mail(), my e-mail is always sent in the bulk folder. Any way on how to avoid this? Thanks!
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

spam filters take a lot of things into account to work:

a few:

1) is it html email
2) if html, does it have an <html> tag
3) if html, does it have an <img> tag offline
4) lots of other html stuff...
5) does it have "special" words (increase your "unit" size, <span style='color:red;text-decoration:blink' title='Alert a moderator!'>grilled spam</span>, cheap, sale etc)

they take all of these factors into account and "rank" the email accordingly. If it meets or exceeds a certain threshhold, it'll dump it into the "spam" box. If you're not using any "spammy" techniques, then check the headers of the emails being sent and see if you can flag something that might be triggering it.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Yeah I think the best thing to do is avoid the whole mail() issue -- Use phpmailer and you won't have those problems. You'll soon discover that Hotmail and few other free email services are very picky about the email headers. I use PHPMailer so I don't have to become an encyclopedia email.

http://phpmailer.sourceforge.net/
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Avoding Spam Detection

Post by Roja »

lamia wrote:Hi, I noticed that everytime I send an e-mail using php native function mail(), my e-mail is always sent in the bulk folder. Any way on how to avoid this? Thanks!
Yes. If its being sorted by SpamAssassin or other common anti-spam tools, they will add headers to the email explaining their scoring. Look at the headers and see why it was scored that way.

If however, it does not have the headers attached, it will depend on finding out what the criteria are that you flagged. I've seen 200+ rules in a single mail processor before, so you really need to find out what specifically YOUR mail is being flagged for.

Once you know, then you can work on solving those specific issues.. as mentioned by another poster, phpmailer is a fantastic library for doing very robust mail sending - yet its very simple! It will let you modify literally every bit of the email possible, to avoid spam issues.
Post Reply