emails not received

Discussion in 'PHP' started by promotingspace.net, Dec 17, 2010.

  1. #1
    Hi
    I use a simple code to send email by PHP like:
    
    <?php
    $email="myemail@yahoo.com";
    $subject="test email";
    $message="test message";
    $sent=mail($email,$subject,$message);
    if($sent) echo "Mail sent";
    else echo "Mail was not sent";
    ?>
    Code (markup):
    I used this code on my host and it was working. But from 2 days ago, emails are not received to the inbox
    I contacted my host and they told me to make sure about this rule:
    you must change the mail server from "mail.your_domain.name" to "scriptmail.intermedia.net"
    But I don't know what I should do about this
     
    promotingspace.net, Dec 17, 2010 IP
  2. AcevedoAaron

    AcevedoAaron Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i am not expert but maybe its problem on your script if its not then i am sure you are configure your mail service with server database like mysqk perl and others that you chose to use
     
    AcevedoAaron, Dec 17, 2010 IP
  3. goodmast3r

    goodmast3r Active Member

    Messages:
    1,220
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    78
    #3
    Why dont ask them again. What's scriptmail.intermedia.net?
     
    goodmast3r, Dec 17, 2010 IP
  4. promotingspace.net

    promotingspace.net Peon

    Messages:
    361
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    my question here is how to set mail server in php code
    it seems they don't know php
     
    promotingspace.net, Dec 17, 2010 IP
  5. underground-stockholm

    underground-stockholm Guest

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm not sure, but I think that you should change the line "SMTP" in php.ini.

    As an aside, delivering emails is more complicated than this. To be sure, one also needs to check the reverse DNS for the mail server, if the HELO string is correct, and one needs to implement SPF and DKIM in the DNS, and one needs a spam checker to preview the messages. Then one might deliver stuff (or not).
     
    underground-stockholm, Dec 17, 2010 IP
  6. qtriangle

    qtriangle Active Member

    Messages:
    179
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    75
    #6
    I think you just need to add "from" attribute before using mail() function.
    So, you should add complete header like
    Here note that the from domain should be same as your hosted domain.
     
    qtriangle, Dec 18, 2010 IP
  7. animebuzz.tv

    animebuzz.tv Peon

    Messages:
    317
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    checking on your code i'm pretty sure its working 99% though its not complete since no header parameter but it should work fine.

    Now my guesses are:
    a.) it could be that your email were placed to spam or bulk
    b.) it could be your server email configuration (but in most cases it's setup properly by default so no need for you to worry about this part)
     
    animebuzz.tv, Dec 18, 2010 IP