Connecting Tech Pros Worldwide Forums | Help | Site Map

Replying to a form that I received by email

Martien van Wanrooij
Guest
 
Posts: n/a
#1: Jul 17 '05
I am rather new at php so the answer to my question could be somewhere on
the web but unfortunately I couldn't find it until now. I am using a form
that is sent to me by email with the following script.

<?
mail ($to, $subject, $message);
$to = "info@mysite.com";
$subject = "Reactie via uw website door ".$naam;
$message = $naam."\n".$email."\n".$reactie;
mail ($to, $subject, $message);
?>

Of course the form field names in this case are naam, email and reactie.
It works fine but I receive the email message from a standard address from
my provider in, my case recycler@vevida.nl so when I press the reply button
in Outlook, the answer is not sent to the sender.
Is there an additional parameter I can add so that the "from" field in
Outlook is automatically set to the one who sent the email? Or is that a
parameter that can only be supplied by my provider?
Suggestions for an url that explains the topic of course are also welcome.

Thanks for any help

Martien van Wanrooij.




Geoff Berrow
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Replying to a form that I received by email


I noticed that Message-ID: <QVdkb.606$2o2.15054@amstwist00> from Martien
van Wanrooij contained the following:
[color=blue]
> $to = "info@mysite.com";
> $subject = "Reactie via uw website door ".$naam;
> $message = $naam."\n".$email."\n".$reactie;
> mail ($to, $subject, $message);[/color]

$to = "info@mysite.com";
$subject = "Reactie via uw website door ".$naam;
$message = $naam."\n".$email."\n".$reactie;
$xtra_headers= "From: $email\n";
mail ($to, $subject, $message,$xtra_headers);

--
Geoff Berrow
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Martien van Wanrooij
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Replying to a form that I received by email



"Geoff Berrow" <bl@ckdog.co.uk.the.cat> schreef in bericht
news:98r2pv05teumn3od9fr08hm00h9bebcpb8@4ax.com...[color=blue]
> $to = "info@mysite.com";
> $subject = "Reactie via uw website door ".$naam;
> $message = $naam."\n".$email."\n".$reactie;
> $xtra_headers= "From: $email\n";
> mail ($to, $subject, $message,$xtra_headers);[/color]

Thank you Geoff, that was exactly what I was looking for. :-)


Martien


Closed Thread