# Submission form successful, but e-mail isn't received

**URL:** <https://forum.kirupa.com/t/submission-form-successful-but-e-mail-isnt-received/17582>\
**Category:** Uncategorized\
**Created:** [April 7, 2003, 6:42am UTC](https://forum.kirupa.com/t/submission-form-successful-but-e-mail-isnt-received/17582 "2003-04-07T06:42:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xzandar](https://avatars.discourse-cdn.com/v4/letter/x/f0a364/32.png) [@Xzandar](https://forum.kirupa.com/u/Xzandar)\
**Post date:** [April 7, 2003, 6:42am UTC](https://forum.kirupa.com/t/submission-form-successful-but-e-mail-isnt-received/17582/1 "2003-04-07T06:42:43Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 6:47am UTC](https://forum.kirupa.com/t/submission-form-successful-but-e-mail-isnt-received/17582/2 "2003-04-07T06:47:23Z")

</div>

sharing the AS and the PHP you used would be really helpful…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 6:52am UTC](https://forum.kirupa.com/t/submission-form-successful-but-e-mail-isnt-received/17582/3 "2003-04-07T06:52:21Z")

</div>

```php
<?php

// Form processing Script : subspace_initialize.php

// Perform Form Validation Here

if ($email=="" || $message=="" || $name=="")
{
echo "<b>ERROR:</b>&nbsp;&nbsp;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\">&nbsp;</td></tr>
<tr><td valign=\"top\" width=\"100%\" colspan=\"2\"><p><a href=\"../disclaimer.php\" target=\"_blank\">Disclaimer</a>&nbsp;&nbsp;::&nbsp;&nbsp;<a href=\"../credits.php\" target=\"_blank\">Credits</a>&nbsp;&nbsp;::&nbsp;&nbsp;<a href=\"../tos.php\" target=\"_blank\">Terms of Use</a>&nbsp;&nbsp;::&nbsp;&nbsp;<a href=\"../privacy.php\" target=\"_blank\">Privacy</a><br>
This site is copyright &copy; 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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2003, 2:13pm UTC](https://forum.kirupa.com/t/submission-form-successful-but-e-mail-isnt-received/17582/4 "2003-04-07T14:13:36Z")

</div>

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](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17313)

read the whole thing, because a few posts down it explains about headers…
