Skip to content

Instantly share code, notes, and snippets.

@fotan
Created April 19, 2016 15:10
Show Gist options
  • Save fotan/7b8bc1a39e5b70d60a731db4637ca42d to your computer and use it in GitHub Desktop.
Save fotan/7b8bc1a39e5b70d60a731db4637ca42d to your computer and use it in GitHub Desktop.
Anonymous Email Page
<?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>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</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