Forum Moderators: coopster
I am very new to PHP. Just trying the mail() function, but it is not sending me any email.
This is my code!
<html>
<body>
<?php
$quantity = $_POST['quantity'];
$item = $_POST['item'];
$email=$quantity;
echo $email;
mail("me@example.com","Email Form Test",$item);
echo "You ordered ". $quantity . " " . $item . ".<br />";
echo "Thank you for ordering from Art Supplies!";
?>
</body>
</html>
**************************
When i tried an if statement to the mail() function, it returned True. Means it is working.
So why am i not getting email?
This drives me really crazy.
Could any one please help me with this.
Thank you.
[edited by: jatar_k at 6:44 pm (utc) on Feb. 22, 2005]
[edit reason] generalized email [/edit]
mail($to, $subject, $message, "From: joe@schmoe.tld");
But by adding the fifth parameter below it changes a different part of the mail headers. I think this only works if the email address is a valid account on the server you're sending from:
mail($to, $subject, $message, "From: joe@schmoe.tld",. "-fjoe@schmoe.tld");