Good Day,
I am using dreamweaver CC to build my website. I built a contact page with a contact form. No matter what I do and what I try I do not receive the email (form). When I push the send message button on the form I get the email confirmation page telling me the email was sent, but I never receive anything in my inbox. I'm stuck. Did I code something wrong?
Contact form:
<div id="FormBox">
<form action="contactformprocess.php" method="post" name="contactform" id="contactform">
<table width="900" border="0" cellspacing="0">
<tbody>
<tr>
<td width="96"><label for="name">Name</label></td>
<td width="800"><input name="name" type="text" id="name" size="40" maxlength="100" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><label for="email">Email*</label></td>
<td><input name="email" type="email" id="email" size="40" maxlength="100" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><label for="subject">Subject</label></td>
<td><input name="subject" type="text" id="subject" size="40" maxlength="100" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><label for="message">Message*</label></td>
<td rowspan="2"><textarea name="message" cols="75" rows="12" wrap="hard" id="message"></textarea></td>
</tr>
<tr>
<td><p> </p>
<p> </p>
<p> </p>
<p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input name="send" type="submit" id="submit" value="Send Message" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><strong><em>*Required Field</em></strong></td>
</tr>
</tbody>
</table>
</form>
</div>
PHP Script
<?php
/* Email Variables */
$emailSubject = 'contactformprocess';
$webMaster = 'contact@jadesambrook.com';
/* Data Variables */
$nameField = $_POST ['name'];
$emailField = $_POST ['email'];
$subjectField = $_POST ['subject'];
$messageField = $_POST ['message'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Subject: $subject <br>
Message: $message <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 xmlns="http://ift.tt/lH0Osb"><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="false" -->
<head><META name="y_key" content="179f50df93cd130f"><meta name="msvalidate.01" content="971B54C15B501C2A7128C4D151220588" /><meta name="google-site-verification" content="8A4TzgP7Wt5zl0iMlCPfJ2HI39XEMIFM2W_UX2srRqs" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Email Confirmation - jadesambrook.com</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #000;
font-size: medium;
font-family: Arial, Helvetica, sans-serif;
}
#container {
width: 920px;
margin-right: auto;
margin-left: auto;
background-color: #FFFFFF;
height: auto;
}
#Nav {
text-align: center;
padding: 10px;
background-color: #000;
color: #EEDD82;
}
#footer {
font-family: Arial, Helvetica, sans-serif;
text-align: center;
clear: both;
padding: 10px;
border-top-color: #000033;
border-right-color: #000033;
border-bottom-color: #000033;
border-left-color: #000033;
background-color: #000;
}
#footerqtv {
color: #FFFFFF;
background-color: #000;
padding: 10px;
}
#Nav ul {
margin: 0px;
padding: 0px;
}
#Nav li {
list-style-type: none;
display: inline;
margin-right: 35px;
margin-left: 35px;
}
#Nav a {
font-size: medium;
text-decoration: none;
color: #EEDD82;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
#Nav a:hover {
color: #FFFFFF;
text-decoration: none;
font-size: medium;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
#footer ul {
margin: 0px;
padding: 0px;
}
#footer li {
list-style-type: none;
display: inline;
margin-right: 35px;
margin-left: 35px;
}
#footer a {
font-size: medium;
text-decoration: none;
color: #EEDD82;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
#footercopyright {
font-size: small;
color: #FFFFFF;
background-color: #000;
height: 1200px;
padding: 10px;
}
#footerqtv img {
background-color: #000033;
border-top-color: #FFFFFF;
border-right-color: #FFFFFF;
border-bottom-color: #FFFFFF;
border-left-color: #FFFFFF;
}
#footer a:hover {
color: #FFFFFF;
text-decoration: none;
font-size: medium;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
#footerqtv a {
color: #FFFFFF;
text-decoration: none;
}
h1 {
font-family: "Arial Black", Arial;
font-size: large;
}
.style2 {
font-family: "Courier New", Courier, monospace;
margin: 10px;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<META name="y_key" content="179f50df93cd130f"><meta name="msvalidate.01" content="971B54C15B501C2A7128C4D151220588" /><meta name="google-site-verification" content="8A4TzgP7Wt5zl0iMlCPfJ2HI39XEMIFM2W_UX2srRqs" />
<style type="text/css">
<!--
#Box {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: x-large;
font-weight: bold;
color: #000000;
margin: 10px;
border: thin solid #000000;
width: 896px;
text-align: center;
height: auto;
vertical-align: middle;
}
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body>
<div id="container">
<div id="Banner"><img src="Photos_and_Images/Template_Page/Banner Image 2013.jpg" alt="jadesambrook.com website banner" width="920" height="328" /></div>
<div id="Nav">
<ul class="style1">
<li><a href="http://ift.tt/1GyJCMT">HOME</a></li>
<li><a href="photography.html">PHOTOGRAPHY</a></li>
<li><a href="aboutjade.html">ABOUT JADE</a></li>
<li><a href="contact.html">CONTACT</a> </li>
</ul>
</div><!-- InstanceBeginEditable name="EditRegion" -->
<div id="Box">
<p> </p>
<p> </p>
<p align="center"><br />
Your email has been sent.</p>
<p align="center">Thank you for contacting jadesambrook.com</p>
<p> </p>
<p> </p>
<p> </p>
</div>
<!-- InstanceEndEditable -->
<div id="footer">
<ul class="style1">
<li><a href="http://ift.tt/1GyJCMT">HOME</a></li>
<li><a href="photography.html">PHOTOGRAPHY</a></li>
<li><a href="aboutjade.html">ABOUT JADE</a></li>
<li><a href="contact.html">CONTACT</a></li>
</ul>
</div>
<div align="center"></div>
<div id="footercopyright">
<div align="center" class="style2">All Rights Reserved © 2015 jadesambrook.com</div>
</div>
</div>
</body>
<!-- InstanceEnd --></html>
EOD;
echo "$theResults";
?>
Aucun commentaire:
Enregistrer un commentaire