BlackOven logo
An enthusiasts view of wood fired hearth oven baking and building!

Pages
Home Page Home
Recipes Recipes
Oven Project Hearth Oven Log
Vermont Trip Vermont Work Shop
Oven Class Wood Fired Oven Building
FAQ Frequently Asked Questions
Links
Oven Building Links Oven Building
Natural Leaven Links Natural Leaven Baking
Merchandise Books & Other Stuff

email: BlackOven
"ShowEmailForm", "Submit" => "CheckAndSend" ); function ShowEmailForm() { $emailForm = <<< EOT
  
Email BlackOven
From Name
Subject
Message
EOT; echo $emailForm; } function CheckEmail ($email) { if (eregi("^[_\.0-9a-z-]+@([0-9a-z][-0-9a-z\.]+)\.([a-z]{2,3}$)", $email, $check)) { if (getmxrr($check[1].".".$check[2],$temp)) { return true; } return false; } else { return false; } } function CheckAndSend($msg) { $spammers = array("91.124.135.254"); $resultFMT = <<< EOT
  
Your message to BlackOven
has been sent.
From %s
Subject %s
Message %s
Your IP Address ( %s / %s ) has been logged.
EOT; if (getenv('HTTP_X_FORWARDED_FOR')) { $addr=getenv('HTTP_X_FORWARDED_FOR'); } else { $addr=getenv('REMOTE_ADDR'); } $host = gethostbyaddr( $addr ); $msg[sender] = stripslashes($msg[sender]); $msg[subject] = stripslashes($msg[subject]); $msg[txt] = stripslashes($msg[txt]); $msg[sender] = preg_replace("/\"/", "'", $msg[sender]); $msg[subject] = preg_replace("/\"/", "'", $msg[subject]); $msg[txt] = preg_replace("/\"/", "'", $msg[txt]); printf($resultFMT, $msg[sender], $msg[subject], ereg_replace("\n", "
\n", $msg[txt]), $addr, $host); if ($msg[sendername] == '') { $extra = "-fblackoven@idkhosting.com"; if (CheckEmail($msg[sender])) { $sender = "From: ${msg[sender]}\n" . "Reply-To: ${msg[sender]}\n" . "X-Mailer: PHP/" . phpversion(); } else { $sender = "From: \"(Anonymous Coward) - ${msg[sender]}\" " . "\n" . "Reply-To: blackoven@idkhosting.com\n" . "X-Mailer: PHP/" . phpversion(); } if (in_array($addr, $spammers)) { unset($msg[txt]); } if ($msg[txt]) { $msg[txt] .= "\n"; if ($host) { $msg[txt] .= "\nRemote_Host: $host"; } if ($addr) { $msg[txt] .= "\nRemote_Addr: $addr"; } mail("blackoven@idkhosting.com", $msg[subject], $msg[txt], $sender, $extra); } } } $currentScreen = isset($_REQUEST['_State']) ? $_REQUEST['_State'] : "Default"; if (! $validScreens[$currentScreen]) { $currentScreen = "Default"; } if ($currentScreen == "Submit") { CheckAndSend($_REQUEST['msg']); } else { $validScreens[$currentScreen](); } ?>
\n"; echo "Last Updated: " . date("F d Y", getlastmod()) . "
\n"; include("copyright.php"); ?>