This is the code that I am trying to get to work to send an email out through the PHP page. I am using the mail function which I have used before however it is not sending. Can someone please take a look and if they see the reason or what I am doing wrong?
You may view it in action at
http://www.standrewschool.com/newsite/live/faculty/contactus.php4?xemail=mjipping@cdeducation.org
<?php
include ("../dbconnect.inc");
session_start();
ob_start();
$xemail3=$_GET['xemail'];
if ($_GET['process']=="newsletterfan")
{
$toemail=$hiddenemail;
$subject=$esubject;
$message=$descr;
$headers="From: $efrom";
mail($toemail , $subject , $message , $headers);
header("Location: [url]http://www.standrewschool.com/faculty/faculty.php4[/url]");
}
?>
<table width="765" cellpadding="5" cellspacing="5" border="0" valign="top">
<tr>
<td colspan="2"><div class="DarkRegular"><font size="4"><b>To email <?php echo $xemail3 ?> fill in your contact email, subject, and message. Thank you!</font><br><br></td>
</tr>
<tr>
<td valign="top">
<div class="DarkRegular"><b>To:</b></td><td><b><?php echo $xemail3 ?><INPUT type="hidden" name="hiddenemail" value="<?php echo $xemail3 ?>"></td>
</tr>
<tr>
<td valign="top"><form action="contactus.php4?process=newsletterfan" method="post" ENCTYPE="multipart/form-data" id=form1 name="updatefan" onSubmit="return validateForm()">
<div class="DarkRegular"><b>From:</b></td><td><input type="text" name="efrom" value="<?php echo $efrom ?>"></td>
</tr>
<tr>
<td valign="top">
<div class="DarkRegular"><b>Subject:</b></td><td><input type="text" name="esubject" value="<?php echo $esubject ?>"></td>
</tr>
<tr>
<td valign="top">
<div class="DarkRegular"><b>Text:</b></td>
<td valign="top"><div class="DarkRegular"><textarea name="descr" rows="20" cols="50"><?php echo $xtext ?></textarea><br><br></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit_button" value="Submit"> <input type="reset" name="cancel_button" value="Cancel">
</td>
</tr></form>
</table>
</body>
</html>
<?php
mysql_close($conn)
?>
Thanks again ,
MIKE