General Mailto Script + Spam-Friendly CAPTCHA
Mailto Script Requirements
- email (required)
- Contains the e-mail address of the person to whom the form results are to be sent
- program aborts if this field is not present on the form.
- from (optional)
- Contains the e-mail address of the e-mail sender - defaults to unknown@memphis.edu
if the field is not present on the form.
- subject (optional)
- Contains the e-mail subject - defaults to “You have a form submission" if the field
is not present on the form.
- thankyou (optional)
- Contains the URL of a “thank you" page - program prints “Thank you for your submission."
if the field is not present on the form.
The Mailto Script / Code
<form action="https://umwa.memphis.edu/mailscript/emailc.php" method="post">
<input name="from" type="hidden" value="suser@memphis.edu" />
<input name="subject" type="hidden" value="Mailto Script Test" />
<input name="thankyou" type="hidden" value="/webdev/news/thankyou.htm" />
<p><label for="SampleTextArea">Sample Textarea form field:</label>
<input name="SampleTextArea" size="40" maxlength="50" type="text" value="enter some text" id="SampleTextArea" /></p>
<p>Sample Radio button form field:</p>
<fieldset>
<legend>Radio Button Select</legend>
<input name="Radiobutton" type="radio" checked="checked" value="RadioItem1Selected" id="radioitem1" /><label for="radioitem1">Item 1</label>
<br />
<input name="Radiobutton" type="radio" value="RadioItem2Selected" id="radioitem2" /><label for="radioitem2">Item 2</label>
<br />
<input name="Radiobutton" type="radio" value="RadioItem3Selected" id="radioitem3" /><label for="radioitem3">Item 3</label>
</fieldset>
<p>Sample Checkbox form field:</p> <fieldset><legend>Checkbox</legend> <input id="checkbox1" type="checkbox" name="Checkbox1" value="Checkbox1Selected" /> <label for="checkbox1">Item 1</label><br /> <input id="checkbox2" type="checkbox" name="Checkbox2" value="Checkbox2Seleced" /> <label for="checkbox2">Item 2</label><br /> <input id="checkbox3" type="checkbox" name="Checkbox3" value="Checkbox3Selected" /> <label for="checkbox3">Item 3</label></fieldset>
<p><label for="email">Enter your E-mail: (the results will be e-mailed to you.)</label> <input name="email" size="40" maxlength="50" type="text" value="enter your e-mail" id="email" /></p>
<p><input name="Submit" type="submit" value="Submit" id="Submit" />
</form>
The HTML Mailto Example form: