Mail() Problem

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by waterway, Oct 16, 2014.

  1. waterway

    waterway New Member Prime Account

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    My mail() script has stopped working and now will not send emails. The "from" address is my own domain email so that is not an issue. Some fault finding has revealed it will send to my own domain email address but not anything outside of that. The code that works is below, if I change the $to address outside my domain it doesn't send. Any help would be great. Thank
    <?php
    $to = "noreply@mydomian.com";

    $from= "noreply@mydomain.com";

    $headers = "From: $from\r\n";

    $subject="Message from website";

    $body= "Trial of email";

    mail ($to,$subject,$body,$headers);
    ?>
     
  2. waterway

    waterway New Member Prime Account

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi guys at X10.
    I'm still not able to solve this problem. I've also noticed that if I use webmail (Squirrel, Roundcube etc) to send an email to address outside of "noreply@mydomain.com" or "enquiry@mydomain.com" it is not received although it does appear in the sent items of the webmail. Any help would be great.

    Thanks

    Phil
     
    Last edited: Oct 21, 2014
  3. bdistler

    bdistler Well-Known Member Prime Account

    Messages:
    3,534
    Likes Received:
    195
    Trophy Points:
    63
  4. waterway

    waterway New Member Prime Account

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi Bdistler,
    Thanks I'll wait till that's fixed and try again.
     
  5. artgla7

    artgla7 New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    see the difference between rows TO and FROM? Suppose this is not your real script if this worked before servers issue.
     

Share This Page