...

View Full Version : Headers for mail()



bfinke
09-01-2009, 03:30 AM
We're expreiencing a really, really frustrating problem.

Right now I'm using a Virtual Dedicated server with godaddy. Our site is a social networking site that allows the group leader (groups usually of 50-75) members send out a mass email (or text) to its members.

The problem is that a lot of our users are reporting that these emails are going to their junk folders. These emails include these people's names, their group, and doesn't have any of the classic spamming content (free, save, viagra....).

I asked godaddy if perhaps someone else on the server was spamming and if this would explain our problem. They didn't help much and said I couldn't switch the ip for my VDS. They said the problem could by my content (which I don't see how this could be) or the headers...

Now the headers I use now, just from some script I copied, was this...

$headers = 'From: sample@sample.com' . "\r\n";
$headers .= "Content-type: text/html";
$checker = mail($email, $subject, $body_message, $headers);

ajetrumpet
09-01-2009, 04:33 AM
We're expreiencing a really, really frustrating problem.

Right now I'm using a Virtual Dedicated server with godaddy. Our site is a social networking site that allows the group leader (groups usually of 50-75) members send out a mass email (or text) to its members.

The problem is that a lot of our users are reporting that these emails are going to their junk folders. These emails include these people's names, their group, and doesn't have any of the classic spamming content (free, save, viagra....).

I asked godaddy if perhaps someone else on the server was spamming and if this would explain our problem. They didn't help much and said I couldn't switch the ip for my VDS. They said the problem could by my content (which I don't see how this could be) or the headers...

Now the headers I use now, just from some script I copied, was this...

$headers = 'From: sample@sample.com' . "\r\n";
$headers .= "Content-type: text/html";
$checker = mail($email, $subject, $body_message, $headers);what is the email servers? yahoo, gmail, lycos, etc...

i know for a fact that yahoo filters PHP mail() to SPAM automatically, regardless of the content. other servers i am unaware of.

bfinke
09-01-2009, 05:21 AM
thanks for you help! ill try to keep better track but Gmail is working, and yes, as you said, yahoo gives problems.

Any suggestions as to how to fix this? Am I missing something in the headers?

What other ways can emails be sent through PHP? Essentially my emails are just like facebook's when it informs you of a new message or event.

ajetrumpet
09-01-2009, 05:39 AM
thanks for you help! ill try to keep better track but Gmail is working, and yes, as you said, yahoo gives problems.

Any suggestions as to how to fix this? Am I missing something in the headers?

What other ways can emails be sent through PHP? Essentially my emails are just like facebook's when it informs you of a new message or event.the mail() function is the only thing i know of. i am no expert, so i wouldn't have a good answer for you on that one. and no, you are not missing something in the headers. it is simply a matter of yahoo administrators knowing where incomming mail is comming from. that's far out, way beyond what my knowledge offers me. i know for a fact there is way to capture this information, as in WHAT server or function sent a message, but that's too deep into the programming and networking world for me to decipher at this point in my career. i'm not there yet.

my only fix that i use for yahoo is i filter my yahoo addresses i get in an access database table, upload them to my domain email account addr book, and send the emails out through distribution lists and BCC lines. that's the only way I can get it to go through and guarantee to reach the inbox, at least for yahoo.

common sense would tell me that you're just kinda STUCK with this yahoo problem, as you can't control what the admins do on their side. i'm not surprised that some companies have blocked mail() either, as this function can be easily abused to create spam. after all, PHP is free...;)

bfinke
09-01-2009, 07:19 AM
thanks for the response -the reality of it sucks, i suppose.

I'm having our website reprgrammed in Ruby on Rails -any reason I should htink that whatever coding is used to send email from this will be better at reaching its destination than the php mail() function?

ajetrumpet
09-01-2009, 08:16 AM
thanks for the response -the reality of it sucks, i suppose.

I'm having our website reprgrammed in Ruby on Rails -any reason I should htink that whatever coding is used to send email from this will be better at reaching its destination than the php mail() function?i have absolutely no experience with ruby, and up until a few light years ago, had never heard of the phrase. ;) as for the risk of not reaching a destination, i can take a stand and tell you with 99% accuracy that a company like Yahoo is not going to hire network administrators who wouldn't know how to go about blocking a similar function by Ruby. personally, i think it's a guessing game.

the only reason i use the PHP mail() to do batch sendings is because it's completely free, and not filtered automatically by a lot of internet mail servers. why pay companies like iContact and ConstantContact ANYTHING when you can use PHP for free and just let a script run and send out all your mail? ;) i learned that lesson real fast.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum