I'm using formmail.cgi, and I would like to send the form results to the user as well as myself.
I am aware of the hidden tag, and how you enter email addreses seperated by commas to send to more than 1 email address. THat works fine.
However, is there a way to send the form results to myself & to an email address specified by the user in a text box?
ie have a textbox with a label
"If you would like a copy, enter email address here"
calling the txtbox txtemail for example.
Thanks for any help, it's greatly appreciated.
Jamie
Matt's FormMail prevents spammers from hijacking your form to send out spam, and it does this by limiting the recipient of the message to be on your own domain. If you cc: the sender then FormMail has to allow the message to go to *anybody*, which means that you leave your script vulnerable to spammers. You can still have the cc: feature (I use it myself), you just have to understand the risk you're taking.
One way to keep spambots from finding your vulnerable script is to rename it. Spambots search the web for files named "formmail.cgi" and "formmail.pl", etc. If you rename your script to something not obvious (e.g., sendymailbooboo.cgi) then spambots won't be able to find it. Human visitors can still find it, but most spammers find scripts with bots, not by personally visiting the pages themselves.
Assuming you're willing to remove the anti-spam security feature, then first rename your formmail script, and also rename the action in the <FORM> tag.
Then find this line in your script: print MAIL "To: $Config{'recipient'}\n";
and add this line under it: print MAIL "Cc: $Config{'email'}\n";
More experienced Perlheads might want to review this message and make sure I didn't make a mistake somewhere. I'm not he biggest Perl veteran.
However, the line of code you suggested I look for was not in my code.
If someone things they may be able to help me on this, I'm concerned about 2 things:
1. CC'ing the user via an email address they enter in a textbox
2. Making a pulldown and txt box required fields (tried the required command, doesn't seem to want to work.
I tried posting the code but it must be too bigg for the forum. If someone can help, I could email it to them.
Thanks for any help on this.
Jamie
The form I have has people do 3 things:
1. Select their name from a pulldown menu
2. Make radio button selections
3. Enter a number in a textbox at the bottom
with reset and submit buttons at the bottom.
Now, I would like for steps 1 and 3 to be required. (ie a required pulldown and text box) with the option for users to input their email address in a text box (which i would add) so that they will also get the email generated from the script.
Could not find an email, so if you think you could still help me, I would really appreciate it.
Thanks,
Jamie