PHP mail() function

Discussion in 'PHP' started by TextAdMarket, Apr 20, 2008.

  1. #1
    How does everyone send mail using PHP? I've been using the basic mail() function but it always get sent to the spam folder. I'm looking into PEAR mail, PHPMailer, and SwiftMail.

    Does anyone else have problems with their site emails getting junked in a spam folder?
     
    TextAdMarket, Apr 20, 2008 IP
  2. monkeyhosts

    monkeyhosts Peon

    Messages:
    466
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I use the mail() function aswell. I find that it is only hotmail and yahoo emails that seem to be going to the junk or spam folders.
     
    monkeyhosts, Apr 20, 2008 IP
  3. CPURules

    CPURules Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I usually don't have a reason to mail things out, but when I do, I use the mail() function. It doesn't ever go to my SPAM box, but I use AIM mail; maybe that has something to do with it.
     
    CPURules, Apr 20, 2008 IP
  4. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    the only reason is that your server is blacklist for sending spam emails. maybe it's someone else that use the same server as yours. try to find a better hoster like hostgator etc.

    i try a same mail() on different server, and the result was different.
     
    fairuz.ismail, Apr 20, 2008 IP
  5. TextAdMarket

    TextAdMarket Peon

    Messages:
    520
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I ran a test to see if my server was blacklisted, and it wasn't. Resellerzoom and Hostingzoom are pretty decent.
     
    TextAdMarket, Apr 20, 2008 IP
  6. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #6
    I read a discussion in php.net's mail() page, some members said you must add several mail headers. Sorry i forget what header should be added, but you can use any mailer class instead of simple mail(), usually, the class has already used that header tech. However it seems the recipient's server filters the mail content too.
     
    xrvel, Apr 21, 2008 IP