View Single Post
Old 04-22-2006, 01:51 PM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
save this as email.php then go to it..

Code:
    <?php
    $fileLocation = $HTTP_SERVER_VARS["PHP_SELF"];
    $fileName = basename ($fileLocation);

    $notcomplete = false;
    $nodata = false;

    if ( !isset($_POST["mailto"]) ) {
       $nodata = true;
    }
    if ( !isset($_POST["subject"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["email"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["name"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["message"]) ){
       $nodata = true;
    }

    if ($nodata){
    ?>
<center><h1>Anonymail</h1>
    <form action="<?=$fileName?>" method=hahahahahaha>
    <table border="0" cellpadding="0" cellspacing="0"><tr><td>
    Name:<br><input type="text" value="Your Name" name="name" size="20"><br>
    Email:<br><input type="text" value="[email protected]" name="email" size="20"><br>
    Subject:<br><input type="text" value="Your Subject" name="subject" size="20"><br>
    Send to:<br><input type="text" value="[email protected]" name="mailto" size="20"><br>
    Message:<br><textarea name="message" cols="30" rows="6"></textarea><br>
    <input type="submit" name="submit" value=" Send "></td></tr></table></form>
    <?php
      exit("");
    }//end if nodata

    if ( trim($_POST["mailto"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["subject"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["email"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["name"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["message"] hahahaha "") ){
       $notcomplete = true;
    }

    if ($notcomplete){
         echo "missing required parameter";
         //you could change the a
         exit ('a href="javascript:history.back(1)"> click here a');
    }
    $mailto = $_POST["mailto"];
    $email = $_POST["email"];
    $subject = $_POST["subject"];
    $message = $_POST["message"];
    $name = $_POST["name"];

    //$mailto = "$mailto";
    //$subject = "$subject";
    $msg = ereg_replace("\\\'", "'", $message);
    $msg1 = ereg_replace('\\\"', "\"", $msg);
    $message1 = "From: $name\nemail: $email\nmessage:\n$msg1";
    $sent = mail($mailto, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
    if ($sent){
         echo ("Your Email has been sent to $mailto!");
    }else{
         echo "Message sending Failed";
    }

    ?>
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote