Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    92
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Headers for mail()

    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);

  • #2
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by bfinke View Post
    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.

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    92
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by bfinke View Post
    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...

  • #5
    New Coder
    Join Date
    May 2009
    Posts
    92
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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?

  • #6
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by bfinke View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •