need help with mail()

lmteestalk

New Member
Messages
5
Reaction score
0
Points
0
i can't receive the email that i wanted to have... my code are as follows:

my order.php

Code:
<form id="orderform" method="POST" action="go.php">
<br /><hr>
<b><font size=4>Item Information</font></b><br>
<hr />
<br>
Item Name :<br />
<input name="ItemName" type="text" id="ItemName" maxlength="25" /><br /><br />

Quantity : (Minimum of 2 pcs to 100 pcs only)<br />
<input name="Quantity" id="Quantity" type="text" maxlength="3" /><br /><br />

Color :<br>
<select name="Color" id="Color">
  <option>Green</option>
  <option>Blue</option>
  <option>Yellow</option>
  <option>Red</option>
  <option>Navy Blue</option>
  <option>Light Blue</option>
  <option>Black</option>
  <option>Orange</option>
</select>
<br /><br />
<hr />
<b><font size=4>Customer Information</font></b><br>
<hr />
<br />
Customer Name : <br />
<input name="CustomerName" id="CustomerName" type="text" maxlength="100" class="nml"/><br /><br />

Customer Address : (Please include your zip code)<br />
<textarea name="CustomerAddress" id="CustomerAddress" class="nml" ></textarea>
<br /><br />

Customer Contact Number(s): <br />
<input name="CustomerContactNumber" id="CustomerContactNumber" type="text" maxlength="100" class="nml"/><br /><br />

E-Mail Address : <br /><input name="Email" id="Email" type="text" maxlength="100" class="nml"/><br /><br />

Optional Message : <br />
<input name="OptionalMessage" id="OptionalMessage" type="text" maxlength="1000" class="hyt" /><br /><br />

By clicking "Submit Order". I verify that all statements are correct and free from any error and thus completing my order request.

<input name="" id="submit" type="submit" value="Submit Order" /><br /><br />
Click "Clear Fields" to reset the form.<br />
<input name="" type="reset" value="Clear Fields" />


</form>


and my go.php is:
Code:
<?php

if(isset($_POST['submit'])) {
$to = "lynmick_aus@yahoo.com";
$subject = "Order received";
$headers="Message-ID: <".mktime()."@".$_SERVER['SERVER_NAME'].">\r\n";
$headers.="X-Mailer: PHP v".phpversion()."\r\n";
$headers.="Content-Type: text/html; charset=iso-8859-1\r\n"; //your char set here


$body = "Order Information:\s
Item Name: ".$_POST['ItemName']."\s
Quantity: ".$_POST['Quantity']."\s
Color: ".$_POST['Color']."\s
Name: ".$_POST['CustomerName']."\s
Address: ".$_POST['CustomerAddress']."\s
Number: ".$_POST['CustomerContactNumber']."\s
Email: ".$_POST['Email']."\s
Optional Message: ".$_POST['OptionalMessage']."\s";

mail($to, $subject, $body, $headers);
}
?>


what seems to be my problem?

i uploaded this to my www and public_html
what else do i lack?

thanks..
 
Last edited:

whizynix02

New Member
Messages
95
Reaction score
0
Points
0
did you look at your spam folder... ? yahoo sometimes treat email from email forms as spam... hmmm that's my problem on my form... it seems like i'm not receiving it but it's all in my spam folder...

hope this help you...
 

whizynix02

New Member
Messages
95
Reaction score
0
Points
0
:werd: hmmm maybe its on the code itself... maybe there is an unnoticed spot there.. it's seems correct but what went wrong...
 

lmteestalk

New Member
Messages
5
Reaction score
0
Points
0
i read somewhere that it has something to do with smtp? or php.ini or stuffs like that.. there are only 5 phppages that i uploaded. and 1 php to be called after clicking submit.. im so desperate i've been dealing with this problem for 4 days now.. i really have to get this working.. :(
 

whizynix02

New Member
Messages
95
Reaction score
0
Points
0
i don't know if this going to work, i've change "hhhh" to 'hhhh '

$body = 'Order Information:\s
Item Name: '.$_POST['ItemName'].'\s
Quantity: '.$_POST['Quantity'].'\s
Color: '.$_POST['Color'].'\s
Name: '.$_POST['CustomerName'].'\s
Address: '.$_POST['CustomerAddress'].'\s
Number: '.$_POST['CustomerContactNumber'].'\s
Email: '.$_POST['Email'].'\s
Optional Message: '.$_POST['OptionalMessage'].'\s';
 

zapzack

New Member
Messages
606
Reaction score
19
Points
0
try

Code:
<?php

if($_POST['submit']) {
$to = "lynmick_aus@yahoo.com";
$subject = "Order received";
$headers="Message-ID: <".mktime()."@".$_SERVER['SERVER_NAME'].">\r\n";
$headers.="X-Mailer: PHP v".phpversion()."\r\n";
$headers.="Content-Type: text/html; charset=iso-8859-1\r\n"; //your char set here


$body = "Order Information:\s
Item Name: ".$_POST['ItemName']."\s
Quantity: ".$_POST['Quantity']."\s
Color: ".$_POST['Color']."\s
Name: ".$_POST['CustomerName']."\s
Address: ".$_POST['CustomerAddress']."\s
Number: ".$_POST['CustomerContactNumber']."\s
Email: ".$_POST['Email']."\s
Optional Message: ".$_POST['OptionalMessage']."\s";

mail($to, $subject, $body, $headers);
}
?>
 
Top