CSC 102

Laboratory: Using the Smith PHP Remailer

 

Smith has a PHP remailing script at http://www.smith.edu/form_mail.php. Form data sent to this address using method="post" will be remailed to an address specified in the form data. To use the remailer, begin your form with the following lines. The items in red indicate areas where you should fill in your own values.

<form action="http://www.smith.edu/form_mail.php" method="post">
  <input name="Form_Mailer_To" type="hidden" id="Form_Mailer_To" value="auser@email.smith.edu">
  <input name="Form_Mailer_Name" type="hidden" id="Form_Mailer_Name" value="Remailer Test">
  <input name="Form_Mailer_URL" type="hidden" id="Form_Mailer_URL" value="http://www.smith.edu/">
  <!-- Any form elements you want should be included here. -->
</form>

The first <input> tag specifies the e-mail address where the form should be mailed. The second gives the subject of the e-mail. The third specifies the url where the browser should be directed next -- typically an acknowledgement or thank-you page. Note that this page will not be able to see any of the form data. The results of the form will be put into an email and sent to the indicated address.

Try it out! Create a new page and copy the above inside the body of the page source. Use your own email address, and include a few other form elements including a submit button. Each time you click the submit button, you should soon get an email message containing the form results.