This form to email processing script is copyright Steve Jensen 2001 It is licensed under the GPL as Free software - please see LICENSE.txt for all details I can be contacted via email at: steve.jensen@gruv.org This script is licensed for use under GPLv2 (and no later versions), but if you redistribute it I'd appreciate getting some credit for writing it (the code isn't *that* bad). This goes double if you've not modified it. Download at http://www.gruv.org/php-form2mail.tar.gz What is this? Simple - its a generic form 2 email processing script. No form-specific configuration in it, in fact, most of the options are set within the forms that use it. To install, extract and copy to a server with PHP and mail() support. For Win32 servers you may need to ini_set() both the SMTP server and the SMTP_From variables, but its been many years since I've set it up on a Windows OS so I'm not sure... Edit the form2mail-config.php file to: set default from email & name that sends you the form contents set server names that are allowed to host forms processed by your script set the default recipient of the emailed form info Once that is done, simply make your form, using method=POST and specify the full URL to the form2mail.php script as the action. For example:
In the form itself, you use hidden inputs to control form behavior - required fields, autoresponder file to send to the person who filled out the form, a pretty redirect page for after submission, etc. Required form fields: Note that this is a comma separated list, no spaces in the form element names please Autoresponder message to mail to the person that completes the form: Note that this should be a pre-formatted plain text file and you need to use the reserved field name "email" to collect their email address. Else you won't have any place to send it to! Set subject in mail sent to form recipient: "Sniff" browser info, user agent, etc. Use all, a few, or leave it out altogether: Reserved field names: This script uses a few reserved field names to do some special things, like set the name of the person that sends you the email that contains the form data, the email address, etc. Makes it easy to just hit "Reply to sender" and respond to a form submission. Persons "real" name: Persons "real" email address: