MikeHeuss.com - The eclectic repository of my life. Programming, writing, and other stuff.

EmailFormPost

My wife designs websites for clients in Alachua, Florida. She does graphic layout, content, that kind of stuff. One obstacle she often ran into was a need for a form to email her client when a prospect filled it out.

In an effort to help her out, I wrote EmailFormPost.php. This script takes any data posted to it and sends it whereever you want it to go.

To make things even cooler, if you specify a template letter, the script will merge the form data into the letter and post that to any email address you specify.

EmailFormPage is simple to use. Just modify the allowed recipients code to be whomever you want the script to be able to send to.

Here are your options:

Required
$required_recipient - The person to recieve the email. Must be in the allowed_recipients array in the script.
$required_thankurl - The page to send them to after sending the email.

Optional
$optional_subject - The optional_subject of the message
$optional_from - The person who recieved the email
$optional_template_path - The path where a template file resides. Should be absolute (http://mikeheuss.com/template.txt).

An included demo file has been included: DemoForm.html and ThankYou.html. To use the demo:

  1. Place your email address in the allowed_recipients array of EmailFormResults.php
  2. Make required_recipients the same address

To download: Tar.gz Zip

To make things easy to understand, I also have two flows available for download, in case you need to modify the php file. Omni Graffle Format or PDF Format

My disclaimer: I don't guarantee that it will work or do anything, it is provided as is. EmailFormPost.php is made available under the BSD License.

Last Updated: 12 Aug 2005

© 1998 - 2009 Mike Heuss   |   mike@mikeheuss.com  |  386 418 0075  |  6823 NW 218th Street Alachua FL 32615