Replying to a form that I received by email

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martien van Wanrooij

    #1

    Replying to a form that I received by email

    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.co m";
    $subject = "Reactie via uw website door ".$naam;
    $message = $naam."\n".$ema il."\n".$reacti e;
    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

    #2
    Re: Replying to a form that I received by email

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

    $to = "info@mysite.co m";
    $subject = "Reactie via uw website door ".$naam;
    $message = $naam."\n".$ema il."\n".$reacti e;
    $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/

    Comment

    • Martien van Wanrooij

      #3
      Re: Replying to a form that I received by email


      "Geoff Berrow" <bl@ckdog.co.uk .the.cat> schreef in bericht
      news:98r2pv05te umn3od9fr08hm00 h9bebcpb8@4ax.c om...[color=blue]
      > $to = "info@mysite.co m";
      > $subject = "Reactie via uw website door ".$naam;
      > $message = $naam."\n".$ema il."\n".$reacti e;
      > $xtra_headers= "From: $email\n";
      > mail ($to, $subject, $message,$xtra_ headers);[/color]

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


      Martien


      Comment

      Working...