reply to header


#1

I have a form that needs a little help, everything is working, except the recipient would like to just hit “reply” as opposed to having to copy/paste the senders email. I think it’s just a header issue…any help is greatly appreciated…code below.

[php]<?php
if ($POST[‘post’] != ‘’)
{
$to = ‘fetch@domain.com’;
$subject = ‘Appointment Request’;
$message = “A user on the website has submitted an appointment request. Find their details below.\n\n”;
$reqd = array(‘name’, ‘email’, ‘phone’, ‘phonetype1’, ‘petname’);
$disregard = array(‘post’, 'Appointment_Mail
’);
$breaks = array(‘break’, ‘break2’, ‘break3’);
foreach($_POST as $key=>$value)
{
if (in_array($key, $reqd) && $value == ‘’)
{
$error .= ‘- Fill out ‘.$key.’
’;
}
elseif (!in_array($key, $disregard))
{
if (in_array($key, $breaks))
{
$message .= “\n”;
}
else
{
$message .= ucwords($key).": “.stripslashes($_POST[$key]).”\n";
}
}
}
if ($error == ‘’)
{
mail(‘fetch@domain.com’, $subject, $message, ‘From: domain.com noreply@domain.com’);
header(‘Location: http://www.domain.com/thanks.html’);
die();
}
else
{
$error = ‘Please correct the following errors:
’.$error;
}
}
?>
[/php]


#2

Yes, it looks like your headers are not set up correctly.

Here is a link that explains it: http://php.net/manual/en/function.mail.php

You need a “FROM:” , but, it is normally placed into the header. Also, you can add a “REPLY TO:” if needed. There are many other items that can be placed into the headers. If you can not figure it out from this link, ask further questions…