I am having a big issue pertaining to the From: field when my form data is sent to clients email.
When my clients form is filled out and sent to their email address it is currently showing up as webmaster@...
I need it to show the customers (person filling out the form) name or email in the From: section in their inbox instead of webmaster@...
Also, nn automatic "order received" message is sent to the customer once an order is placed. When this message is sent it is also showing up as From: webmaster@...
In this instance I need it to show my clients name or email in the From: field in the customers inbox rather than the webmaster@...
Here is my current code.
/* Mail Function */
$to = 'info@indeygo.com';
$from = 'From: You <info@indeygo.com>';
$subject = 'Indeygo Customer Order';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: InDeyGo <info@indeygo.com>' . "\r\n";
$headers .= 'From: ' . $from . "\r\n";
mail($to, $subject, $message, $headers);
mail($email, "Thank you for your Order", "You will receive confirmation within 24 hours that your order has been received. If you don't hear from us, please call 1-877-463-3946 to confirm we received your order.\n\nThis is an automatically generated message, please do not reply to it.");
header("Location: ../thank-you-order.php");
Any help would be greatly appreciated.
Thanks.