Created
April 19, 2016 15:10
-
-
Save fotan/7b8bc1a39e5b70d60a731db4637ca42d to your computer and use it in GitHub Desktop.
Anonymous Email Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_GET['submitted']) && $_GET['submitted'] == "y") { | |
// Email the message | |
$head = "MIME-Version: 1.0\r\n"; | |
$head .= "Content-type: text/html; charset=Windows-1251\r\n"; | |
$head .= "From: \r\n"; | |
$to = "somebody@email.com"; | |
$subject =""; | |
$body = $_GET['email_text']; | |
$retval = mail($to, $subject, $body, $head); | |
if($retval) // If the email was sent, redirect | |
{ | |
// Include the Email Tracking file here | |
header('Location: index.php'); | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>TJ's anonymous email sender</title> | |
</head> | |
<body> | |
<p> </p> | |
<p> </p> | |
<p> </p> | |
<p> </p> | |
<p> </p> | |
<div align="center"> | |
<form> | |
<p><textarea name="email_text" rows="20" cols="100" autofocus></textarea></p> | |
<input type="hidden" name="submitted" value="y"> | |
<p><input type="submit" value="Send Email"></p> | |
</form> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment