ok so i've setup a form to collect a users email, name, phone number, and any comments they may have. What I'd like to do is have a confirmation email sent to them and one sent to me. The problem I'm having is getting the confirmation sent to them. I get all the notifications that someone has submitted information but they dont ever get the confirmation email. If i run the form through localhost and use my email, I can get both the confirmation and the "notification" that someone has submitted information. Oh and as I'm running this kind of as a "demo", I'm running the webserver off of my home computer and os 10.5. I had a friend fill out the form at his house and I did recieve the "notification" but he did not recieve the confirmation. Heh, sorry for the essay but I'm just trying to figure it out. Keep in mind that I am totally new to php so I appreciate any advice that can be givin. Heres the php code:
PHP:
<?php
/* Subject and email veriables */
$emailSubject = 'Thank You!';
$masterSubject = 'Information Request';
$webMaster = 'myemail@email.com' ;
/* Gathering data variables */
$emailField = $_POST ['email'];
$nameField = $_POST ['name'];
$phoneField = $_POST ['phone'];
$commentsField = $_POST ['comments'];
$body = <<<EOD
A request for additional information has been recieved:
Email: $emailField
Name: $nameField
Phone Number: $phoneField
Comments: $commentsField
EOD;
$body2 = <<<EOD
This email is to confirm that we have recieved the following information:
Email: $emailField
Name: $nameField
Phone Number: $phoneField
Comments: $commentsField
Please do not reply to this email.
EOD;
$headers = "From: $emailField\r\n" ;
/* $headers .= "Content-type: text/html\r\n" ; */
$success = mail ($webMaster, $masterSubject, $body, $headers) ;
$success2 = mail ($emailField, $emailSubject, $body2, $headers) ;
/* Results rendered as html */
$theResults = <<<EOD
<html>
<head>
<title>Form Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>
<div>
<div align="left">Thank you for your interest! Your email will be answered very soon!</div><br>
<div aligh="left">If you are not redirected back within a few seconds, click <a href="index.html">here</a>.</div>
</div>
<meta http-equiv="refresh" content="5;url=index.html">
</body>
</html>
EOD;
echo "$theResults" ;
?>