Forum Moderators: coopster & phranque

Message Too Old, No Replies

FormMail.pl configuration

form data from address

         

erinsmith

4:48 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



I'd like the form data email that we receive from using FormMail to come from the email address of the person filling it out. Right now it comes from an email the server generates, i.e. nobody@lsh138.example.com.

How do I modify FormMail.pl script to show the address of the person completing the form? I think it is in this area below, but don't know what to enter.

$confirmation_text = <<'END_OF_CONFIRMATION';
From: you@your.com
Subject: form submission

Thank you for your form submission.

END_OF_CONFIRMATION

Thanks in advance.

[edited by: jatar_k at 5:52 pm (utc) on June 24, 2004]
[edit reason] generalized [/edit]

Dave_Baker

6:38 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Are you using Matt's Script Archive, or the nms version of the formmail script?

erinsmith

9:00 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



I'm using Matt's Script

Dave_Baker

9:21 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Yikes, could be dangerous. There's a security problem with earlier versions of the script that enables spammers to hijack the form and use it to send spam from your server.

A secure script has been built by a group of Perl coders in London -- you might want to use it instead:

see [nms-cgi.sourceforge.net...]

erinsmith

10:11 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



I checked and the version is:

NMS FormMail Version 3.05c1

Can you hlep me using what I already have?

Dave_Baker

1:59 am on Jun 25, 2004 (gmt 0)

10+ Year Member



The way it works in my version (3.12c1) is that the email address of the person filling in the form automatically is used as the "from" email address in the email containing the form contents, if you have an input field in the HTML form having the name of "email" and if the user puts his or her email address into that field ... for example:

<form action="cgi-bin/nms/FormMail.cgi">
Please enter our email address: <input type="text" name="email">
... [other fields here]
<input type="submit" name="submit" value="Submit">
</form>