PHP mail code works on other hosts but no x10?

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by liammk, Mar 11, 2010.

  1. liammk

    liammk New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    I have made a script to send emails in PHP:


    PHP:
    <?php
    $to 
    "XXX@bigpond.com";
    $subject "request";
     
    $body $_GET["email"];
    if (
    mail($to$subject$body)) {
     echo(
    "<br/><br/>Message successfully sent!</p>");
     } else {
     echo(
    "<br/><br/>Message delivery failed...</p>");
     }
     
    ?>
    But when i load the page it says & i dont recive an email:


    Message successfully sent!"); } else { echo("
    Message delivery failed...
    "); } ?>


    where am i going wrong? The script works on other hosts...
     
  2. morpheus1234567

    morpheus1234567 New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
  3. liammk

    liammk New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    Why's x10 make it so complex! Why can i just use the good old mail()
     
  4. misson

    misson Community Paragon Community Support

    Messages:
    2,572
    Likes Received:
    72
    Trophy Points:
    48
    Note that the script has an injection vulnerability via the "email" input variable. An attacker can inject arbitrary headers.

    The script from the tutorial is simply using mail(). Half of the script displays a result page. There are other difficulties sending e-mail on X10 due to spammers abusing the servers.
     
    Last edited: Mar 11, 2010
  5. sikvxz

    sikvxz New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
  6. misson

    misson Community Paragon Community Support

    Messages:
    2,572
    Likes Received:
    72
    Trophy Points:
    48

Share This Page