Why some of my emails are not delivered?

Discussion in 'PHP' started by UCDaZ, Jul 27, 2009.

  1. #1
    I'm using the php function mail() to send out emails when someone signs on for my service. For some reason, some emails are not delivered to the user.
    I even asked my users to check their spam/junk folders, and they said there's no email from my service.
    Does anyone know how to solve this problem?

    Thanks!
     
    UCDaZ, Jul 27, 2009 IP
  2. AustinQPT

    AustinQPT Member

    Messages:
    75
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    They may be adding a whitespace to the email. I recommend using trim or better yet str_replace to make sure the white characters are not there. If you are getting the emails from a database I can send you a script I made that will make sure all emails are good to go, but it is not perfect.

    If you are getting the emails from a get statement make sure the email has whitespaces removed before get or post data is sent or else it will get messy.
     
    AustinQPT, Jul 27, 2009 IP
  3. web@master24

    web@master24 Active Member

    Messages:
    418
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Thats depend if the recipient have block your ip or domain, for example yahoo dont accept any mail from my server
     
    web@master24, Jul 27, 2009 IP
  4. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Some email providers will not accept emails if the server's rDNS is not set or if it's set incorrectly. That's one thing to check.

    Also see what the sender's email address is set to. Some phpmailer setups use the hostname of the webserver instead of using the actual domain that's sending the email. That's another thing to check.

    If you could post the header of an email message that made it though, we may be able to tell more.
     
    theapparatus, Jul 27, 2009 IP
  5. UCDaZ

    UCDaZ Active Member

    Messages:
    180
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    UCDaZ, Jul 30, 2009 IP
  6. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #6
    if its not whitespaces or wrong emails .. and if your script usually works , and if the servers yorue sending to arent blocking them, ..then its your server thats not allowing them to all go out ...why? dont know.

    and check for possible injected code. somebody could be sending your users to their site?
    just a possibility - but if your code is normal , ask your server.
     
    ezprint2008, Jul 31, 2009 IP