1 php mail box 1st February 2010, 6:16 pm
ogre
Moderator
php mail box ....
- Code:
<html>
<head><title>anonymous mail sender</title><LINK REL="StyleSheet" HREF="mailspammer.css" TYPE="text/css" /></head>
<body>
<center>
<h2>This is only testet on hotmail!</h2>
<form action="aspammerv1.php" method="post">
Who should have the mail:<input type="text" name="victim"><br />
Subject:<input type="text" name="subject"><br />
Your mail:<input type="text" name="ymail"><br />
Mail:<textarea name="mail" rows="20" cols="50"></textarea><br />
<input type="submit" value="Send mail" name="knap"><br />
<?
if(isset($_POST["knap"])){
$from = $_POST["ymail"];
if (preg_match("/^[^@]*@[^@]*\.[^@]*$/", $from)) {
$to = $_POST["victim"];
$subject = $_POST["subject"];
$from = $_POST["ymail"];
$message = $_POST["mail"];
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail sent to $to!";
}else{
echo "enter a valid email!";
}
}else{
}
?>
</center>
</body>
</html>