Problem with e-mail sender

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
Phil_V
Forum Newbie
Posts: 6
Joined: Mon May 22, 2006 2:41 am

Problem with e-mail sender

Post by Phil_V »

Hello every one i have made a simple PHP e-mail sender for users in our system. But there is a problem.
Every mail sent by our system is sent to their bulk folder.
How can i fix this. Please help.

10x in advance
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

check your headers and search this forum, this question has been answered many time before.
bdlang
Forum Contributor
Posts: 395
Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US

Post by bdlang »

Sounds like they have a spam filter that is filtering your messages based on a specific criteria. I suppose you need to find out why they're being blacklisted (could be the server/domain PHP is on, could be a specific header switch you are omitting, etc). Look at the message headers and find out what criteria the receiving server has for filtering messages. I wouldn't consider this a PHP issue.
Phil_V
Forum Newbie
Posts: 6
Joined: Mon May 22, 2006 2:41 am

Post by Phil_V »

shiznatix wrote:check your headers and search this forum, this question has been answered many time before.

10x, can some one give me a link? :D
Phil_V
Forum Newbie
Posts: 6
Joined: Mon May 22, 2006 2:41 am

Post by Phil_V »

bdlang wrote:Sounds like they have a spam filter that is filtering your messages based on a specific criteria. I suppose you need to find out why they're being blacklisted (could be the server/domain PHP is on, could be a specific header switch you are omitting, etc). Look at the message headers and find out what criteria the receiving server has for filtering messages. I wouldn't consider this a PHP issue.

:) it's not a PHP issue it's obviously mine :)
Phil_V
Forum Newbie
Posts: 6
Joined: Mon May 22, 2006 2:41 am

Post by Phil_V »

ok so i've checked the headers and made them like on the ones when you recieve mails in yahoo mail. but still the message in received in bulk.


Please help me.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Phil_V wrote:ok so i've checked the headers and made them like on the ones when you recieve mails in yahoo mail. but still the message in received in bulk.


Please help me.
If it's the server that you're:

a) Connecting to SMTP from
b) Sending SMTP from

that's been blacklisted then you're stuck buddy. Try sending from another server (your home PC?) and see if anything changes.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Phil_V wrote:ok so i've checked the headers and made them like on the ones when you recieve mails in yahoo mail. but still the message in received in bulk.


Please help me.
Oh yes, and don't try to copy too much from Yahoo, faking EHLO lines and message ID's get's picked up in a flash by spam filters. You're welcome to see how I handle this in Swift (see siggy below).
Phil_V
Forum Newbie
Posts: 6
Joined: Mon May 22, 2006 2:41 am

Post by Phil_V »

so i could not do anything.here is my header if someone can edit it?


$headers = 'From: '.$my['admin_email'].'' . "\r\n";
$headers .= 'To: '.$email.'' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
@mail($email, 'subject', $text, $headers);
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Phil_V wrote:so i could not do anything.here is my header if someone can edit it?


$headers = 'From: '.$my['admin_email'].'' . "\r\n";
$headers .= 'To: '.$email.'' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
@mail($email, 'subject', $text, $headers);
There's nothing in there which would cause a spam blocker to reject it. It's most likely the host your on is blacklisted in the RBL's (Real Time Blacklists).

Things that would push a spam score up:

HTML only content types (use a mixed content type)
Blacklists
Forged headers
Forged EHLO/HELO (not applicable here)
Short messages (less than a sentence or so)
Lots of symbols in the subject line
Reference the pharmaceuticals, sex, porn, money
Sending mail from dynamic IP addresses
Phil_V
Forum Newbie
Posts: 6
Joined: Mon May 22, 2006 2:41 am

Post by Phil_V »

d11wtq wrote:
Phil_V wrote:so i could not do anything.here is my header if someone can edit it?


$headers = 'From: '.$my['admin_email'].'' . "\r\n";
$headers .= 'To: '.$email.'' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
@mail($email, 'subject', $text, $headers);
There's nothing in there which would cause a spam blocker to reject it. It's most likely the host your on is blacklisted in the RBL's (Real Time Blacklists).
i've checked that too and the server is not blacklisted.
And i can't uderstand why the mail is going into bulk :roll: :arrow: :?:
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Phil_V wrote:
d11wtq wrote:
Phil_V wrote:so i could not do anything.here is my header if someone can edit it?


$headers = 'From: '.$my['admin_email'].'' . "\r\n";
$headers .= 'To: '.$email.'' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
@mail($email, 'subject', $text, $headers);
There's nothing in there which would cause a spam blocker to reject it. It's most likely the host your on is blacklisted in the RBL's (Real Time Blacklists).
i've checked that too and the server is not blacklisted.
And i can't uderstand why the mail is going into bulk :roll: :arrow: :?:
Try using something other than mail() which seems to be a bit of a pitfall when it comes to being spam-blocked - phpMailer usually works well and I recently wrote one that supports plugins (see sig).
Post Reply