-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
41 lines (37 loc) · 1.18 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
$to = trim($_POST["to"]);
$sub = trim($_POST["sub"]);
$text = $_POST["text"];
$from = trim($_POST["from"]);
$cc = "From: " . $from . "\r\n" . "CC: " . $from;
$submit = $_POST["submit"];
if(isset($submit)){
if ($_SERVER['REQUEST_METHOD'] === 'POST'){
if(empty($from) || empty($to) || empty($sub)){
echo "<center><h2>Please Complete All Of Them!</h2></center>";
}else{
mail($to,$sub,$text,$cc);
echo "<script>alert('Mail Has Been Sent!'); </script>";
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fake Mail Sender</title>
</head>
<body>
<center>
<form action="" method="post">
<br><input type="text" name="from" placeholder="From">
<br><input type="text" name="to" placeholder="To">
<br><input type="text" name="sub" placeholder="Subject">
<br><textarea name="text" placeholder="Your Message Here" rows="4" cols="40"></textarea>
<br><input type="submit" name="submit" value="Send">
</form>
</center>
</body>
</html>