Here’s my conflict: I’ve setup a form for people to contact me. Now, I ran a test, and the script runs error free, but I do not receive the e-mail. Any ideas? I know it could be the host’s server, or something else, but does anyone else know what it might be?
Christopher William Coddington (Xzandar / cwcandromeda)
system
April 7, 2003, 6:47am
2
sharing the AS and the PHP you used would be really helpful…
system
April 7, 2003, 6:52am
3
<?php
// Form processing Script : subspace_initialize.php
// Perform Form Validation Here
if ($email=="" || $message=="" || $name=="")
{
echo "<b>ERROR:</b> Blank submission or you didn't fill in some fields. Go back.";
}
else {
//do email format validation
if(!eregi('^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$', $email)) {
echo "That does not look like a valid email address, please re-enter.";
exit;
}
$to = "andromeda@cwuniverse.com";
$header = "From: \"$email\" <$email>
";
$subject = "Subspace Communications :: Submail";
$content = "Contents: \"$message\"
";
mail("$to", $header, "$subject", $content);
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title>Christopher William Coddington :: Journal Content</title>
<style>
<!--
body{
scrollbar-face-color: #000000;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #000000;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #000000;
scrollbar-arrow-color: #C8D4DA;
}
p{
color: #C8D4DA;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
li{
color: #C8D4DA;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
a:link, a:visited{
color: #F2EBBA;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
text-decoration: underline;
}
a:hover, a:active{
color: #FFE56B;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
text-decoration: underline;
}
.header{
color: #C8D4DA;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
}
.subHeader{
color: #C8D4DA;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
}
.footer{
margin-top: 36px;
margin-bottom: 12px;
}
.footer p{
color: #C8D4DA;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
.footer a:link, .footer a:visited{
color: #F2EBBA;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
text-decoration: underline;
}
.footer a:hover, .footer a:active{
color: #FFE56B;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
text-decoration: underline;
}
-->
</style>
</head>
<body bgcolor=\"#000000\" topmargin=\"0\" leftmargin=\"0\" marginheight=\"0\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\" width=\"100%\" height=\"100%\">
<tr><td valign=\"top\" width=\"20%\"><p align=\"center\"><img border=\"0\" src=\"../images/front_thumb1.jpg\"></p></td>
<td valign=\"top\" width=\"80%\">
<p>www.christopherwilliamcoddington.tk<br>
<span class=\"subHeader\">Thank You!</span><br>
Thank you! You're message was initialized. You will be contacted with notification that your message was received, with a reply to your message, shortly.<br><br>
<a href=\"http://www.christopherwilliamcoddington.tk\">www.christopherwilliamcoddington.tk Subspace Team</a>
</p></td></tr>
<tr><td colspan=\"2\"> </td></tr>
<tr><td valign=\"top\" width=\"100%\" colspan=\"2\"><p><a href=\"../disclaimer.php\" target=\"_blank\">Disclaimer</a> :: <a href=\"../credits.php\" target=\"_blank\">Credits</a> :: <a href=\"../tos.php\" target=\"_blank\">Terms of Use</a> :: <a href=\"../privacy.php\" target=\"_blank\">Privacy</a><br>
This site is copyright © 1999 - 2003 by <a href=\"mailto:cwcoddington@christopherwilliamcoddington.tk\">Christopher William Coddington</a>. All rights reserved.</p></td></tr></table>
</body>
</html>";
}
?>
That’s the code I used. I didn’t use any Action Scripts.
Christopher William Coddington (Xzandar / cwcandromeda)
system
April 7, 2003, 2:13pm
4
take the quotes off of the “$to” first of all, then your order is wrong in the mail() function. here, check out this thread, it might help:
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17313
read the whole thing, because a few posts down it explains about headers…