Gabby7
09-02-2009, 08:46 PM
Hello+
I have attempted to write a simple PHP script to send the contact information to a specific email address. Everything seems to be working fine, except the email is not reaching me. I'm not certain what is going wrong - can anyone help? The PHP code is below:
<?php
/* subject and email variables */
$emailSubject = 'Contact From Website!';
$webMaster = 'nomad654321@earthlink.net';
/* gathering data variables */
$emailField = $_POST['email'];
$nameField = $_POST['cname'];
$phoneField = $_POST['phone'];
$interestedField = $_POST['interested'];
$artworkField = $_POST['artwork'];
$commentsField = $_POST['comments'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $cname <br>
Phone Number: $phone <br>
Interested in: $interested <br>
Artwork: $artwork <br>
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>Photography by Lynn Santus</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
font-family: "Times New Roman", Times, serif;
font-size: 18px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #330099;
text-decoration: none;
background-image: url(images/greengrunge10.png);
text-align: center;
}
-->
</style>
</head>
<div>
<div align="center">
<p><img src="images/lynnbanner.png" alt="Photography by Lynn Santus" width="801" height="150" border="0" usemap="#Map">
<map name="Map"><area shape="rect" coords="84,3,603,154" href="index.html" alt="Link to Home Page">
</map></p>
<p>Thank you for your interest! Your email will be answered very soon!</p>
<p>Click <a href="index.html">here</a> to return to the Home Page. </p>
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Thank you for any guidance offered...
I have attempted to write a simple PHP script to send the contact information to a specific email address. Everything seems to be working fine, except the email is not reaching me. I'm not certain what is going wrong - can anyone help? The PHP code is below:
<?php
/* subject and email variables */
$emailSubject = 'Contact From Website!';
$webMaster = 'nomad654321@earthlink.net';
/* gathering data variables */
$emailField = $_POST['email'];
$nameField = $_POST['cname'];
$phoneField = $_POST['phone'];
$interestedField = $_POST['interested'];
$artworkField = $_POST['artwork'];
$commentsField = $_POST['comments'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $cname <br>
Phone Number: $phone <br>
Interested in: $interested <br>
Artwork: $artwork <br>
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>Photography by Lynn Santus</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
font-family: "Times New Roman", Times, serif;
font-size: 18px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #330099;
text-decoration: none;
background-image: url(images/greengrunge10.png);
text-align: center;
}
-->
</style>
</head>
<div>
<div align="center">
<p><img src="images/lynnbanner.png" alt="Photography by Lynn Santus" width="801" height="150" border="0" usemap="#Map">
<map name="Map"><area shape="rect" coords="84,3,603,154" href="index.html" alt="Link to Home Page">
</map></p>
<p>Thank you for your interest! Your email will be answered very soon!</p>
<p>Click <a href="index.html">here</a> to return to the Home Page. </p>
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Thank you for any guidance offered...