PHP 5 Mail issues.
Posted: Tue Dec 27, 2011 10:52 am
Hello Everyone,
I'm having issues sending mail using a simple PHP mail script. The script generates no errors and from what I can tell should be sending the email. Here is the phpinfo link http://www.abesfamilyfire.com/phpinfo.php CentOS Linux and Apache
Here is the form
Here is the processing code of the script
Any help is much appreciated.
I'm having issues sending mail using a simple PHP mail script. The script generates no errors and from what I can tell should be sending the email. Here is the phpinfo link http://www.abesfamilyfire.com/phpinfo.php CentOS Linux and Apache
Here is the form
Code: Select all
<form onsubmit="return checkFormData()" id="contactForm" action="contactProcess.php" method="get">
<div style="background-color:#FFFF66">
<label for="name">Name:</label>
<input type="text" name="name" id="name" size="20" maxlength="30" /><br /><br />
<label for="address">Address:</label>
<input type="text" name="address" id="address" size="20" maxlength="70" /><br /><br />
<label for="city">City:</label>
<input type="text" name="city" id="city" size="20" maxlength="70" /><br /><br />
<label for="state">State:</label>
<input type="text" name="state" id="state" size="20" maxlength="70" /><br /><br />
<label for="zipCode">Zip Code:</label>
<input type="text" name="zipCode" id="zipCode" size="20" maxlength="70" /><br /><br />
<label for="email">Email:</label>
<input type="text" name="email" id="email" size="20" maxlength="70" /><br /><br />
<label for="message">Include A Message:</label>
<textarea rows="10" cols="40" name="message" id="message" size="20" maxlength="500"></textarea><br /><br />
<INPUT TYPE="image" SRC="SendYourMessage.jpg" BORDER="0" ALT="Send Your Message"><br /><br />
</div>
</form>
Here is the processing code of the script
Code: Select all
<?php
$Name = $_GET['name'];
$email = $_GET['email'];
$recipient = "ndjustin20@hotmail.com";
$mail_body = $_GET['name'] . "\r\n" . $_GET['address'] . "\r\n" . $_GET['city'] . "\r\n" .
$_GET['state'] . "\r\n" . $_GET['zipCode'] . "\r\n" . "\r\n" . "\r\n" . $_GET['message'];
$subject = "Feedback from Abes Family Fire Website";
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
ini_set('sendmail_from', 'abe@abesfamilyfire.com'); //Suggested by "Some Guy"
mail($recipient, $subject, $mail_body); //mail command :)
?>
<?php $pageNum = 7 ?>
<?php include('messages.php'); ?>
<?php include('head.php'); ?>
<body class="thrColHybHdr">
<div id="container">
<div id="header">
<h1 align="center"><?php echo $headerMessage; ?></h1>
<!-- end #header --></div>
<?php include('sideBar1.php'); ?>
<?php include('sideBar2.php'); ?>
<?php include('main.php'); ?>
<?php include('footer.php'); ?>