<?php
# some settings of POST vars
if (!isset($_POST['state'])) $state = ''; else $state = $_POST['state'];
if (!isset($_POST['toText'])) $toText = ''; else $toText = $_POST['toText'];
if (!isset($_POST['subjectText'])) $subjectText = ''; else $subjectText = $_POST['subjectText'];
if (!isset($_POST['msgText'])) $msgText = ''; else $msgText = $_POST['msgText'];
if (!isset($_POST['ccText'])) $ccTexth = ''; else $ccText = $_POST['ccText'];
if (!isset($_POST['bccText'])) $bccText = ''; else $bccText = $_POST['bccText'];
if (!isset($_POST['nameText'])) $nameText = ''; else $nameText = $_POST['nameText'];
if (!isset($_POST['fromText'])) $fromText = ''; else $fromText = $_POST['fromText'];
if ($state == "") {
$title="Test Email Page";
$announce="---";
}
else {
// $ccText="";
$toText="[email protected]";
$title="Test Email Page";
$announce="Your Message has been Sent!";
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
$header .= "From: ".$fromText."\r\n";
$header .= "Cc: ".$ccText."\r\n";
// $header .= "Reply-To : ".$fromText."\r\n";
$header .= "X-Priority: 1\r\n";
$header .= "X-Mailer: PHP\r\n\r\n";
// ini_set(sendmail_from,$fromText);
mail($toText, $subjectText, $msgText, $header);
// ini_restore(sendmail_from);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php echo($title)?></title>
<style type="text/css">
<!--
A:link { color: #999999; }
A:visited { color: #999999; }
A:hover {color: #0099ff;}
-->
</style>
</head>
<body bgcolor="#ddeedd">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" summary="" width="580">
<tr><td align="center">
<?php
echo ("State: ".$state." To: ".$toText."<br>\nSubject: ".$subjectText."<br>\n".$msgText."<br>\ncc: ".$header);
?>
<p><b><font color="#000000" size="5">Test Email</font></b></p>
<font size="4" color="#000000">
<!-- <form method="POST" action="<?php echo($PHP_SELF)?>"> -->
<form method="POST" action="Email.php">
<p><font size="3"><b>Name: <input type="text" name="nameText" size="46"></b></font></p>
<p><font size="3"><b>Email: <input type="text" name="fromText" size="46"></b></font></p>
<input type="hidden" name="subjectText" value="Web Mail"></p>
<input type="hidden" name="mailformat" value="Text"></p>
<p><font face="Arial" size="3"><b>Message Text:</b></font></p>
<p><font face="Arial" size="3"><b><textarea rows="6" name="msgText" cols="60"></textarea></b></font></p>
<p><font size="3"><b><input type="submit" value="Send" name="send" style="font-family: Arial; font-size: 12pt; font-weight: bold"></b></font></p>
<input type="hidden" name="state" value="1">
</form>
<b><font face="Arial" size="4" color="#e00000"><?php echo($announce)?></font></b><br><br>
<input type=button value="Or Cancel - close This Window" onClick="javascript:window.close();">
</font>
</td></tr>
</table>
</div>
</body>
</html>
|