Location: PHPKode > scripts > iYell > iyell/contactsend.php
<?php
    session_start();
    include("cnx.php");
    
    $post = array(
        "yell",
        "body",
        "from",
        "who");
        
    foreach($post as $p){
        $_SESSION[$p] = $_POST[$p];
        if($_POST[$p] == ""){
            $_POST[$p] = "Unknowed";
        }
    }
    
    if($_POST["calc"] != $_SESSION['total']){
        include("head.php");
        echo("If you are not a robot, please <a href='contact.php'>try again</a>.");
        include("foot.php");
        die();
    }
    
    $headers = 'From: ' . $_POST["from"] . "\r\n" .
     'Reply-To: ' . $_POST["from"] . "\r\n" .
     'X-Mailer: PHP/' . phpversion();

    if(mail($mail,"[iYell.net] Contact",wordwrap("Hey, 
Someone want to contact you about the yell nr. ". $_POST["yell"].". His e-mail is ". $_POST["from"] ." and he is ". $_POST["who"] .". Here is his message : 
".$_POST['body']),$headers)){
    include("head.php");
    echo("E-mail sent. <a href='/'>Back to mail page</a>.");
    include("foot.php");
    
    foreach($post as $p){
        unset($_SESSION[$p]);
    }
    die();
    }else{
    include("head.php");
    echo("Error while sending mail. <a href='/'>Please try again</a>.");
    include("foot.php");
    }
Return current item: iYell