[nzlug] FormMail Help Needed

Michael Dittmer michael at inside-job.co.nz
Fri Jan 26 17:40:00 NZDT 2007


Hi All

I have a FormMail script on a website (running on a linux box in a 
shared hosting environment) that when you press the submit button it 
emails the address in the script. Up to this point in time the script 
has worked fine, however I need to make changes to the script so that 
when a person enters their email address in the necessary field they 
also get a copy of the email sent. This is what I don't know how to do.

I'm guessing that I can provide some sort of parameter passing to the 
script from the HTML form. Below is the code for the Email box part of 
the form.

<tr>
<td align=right width=160> <p align="left"><strong><font face="Verdana, 
Arial, Helvetica, sans-serif"><font size="3">E-mail: * 
</font></font></strong></p></td>
<td width="402"><p align="left" ><font face="Verdana, Arial, Helvetica, 
sans-serif"><b><font size="-1"><input type=text name=email value="" 
size=75 maxlength=75></font></b></font></p></td>
</tr>

This is the part of the Submit button code that could also need changing:

<input type=hidden name="required" value="name,phone,email">

The code I believe that needs changing is below, however I can provide a 
link to the entire FormMail.pl script file. I currently haven't 
developed the HTML form that the script gets info from as I have only 
been asked about the change yesterday afternoon.

Thanks

Michael


BEGIN
{
$DEBUGGING         = 1;
$emulate_matts_code= 0;
$secure            = 1;
$allow_empty_ref   = 1;
$max_recipients    = 5;
$mailprog          = '/usr/sbin/sendmail -oi -t';
$postmaster        = '';
@referers          = qw(www.somedomain.co.nz somedomain.co.nz localhost);
@allow_mail_to     = qw(someaddress at somedomain.co.nz localhost);
@recipients        = ();
%recipient_alias   = ();
@valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER 
HTTP_USER_AGENT);
$locale            = '';
$charset           = 'iso-8859-1';
$date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
$no_content        = 0;
$double_spacing    = 1;
$wrap_text         = 0;
$wrap_style        = 1;
$send_confirmation_mail = 0;
$confirmation_text = <<'END_OF_CONFIRMATION';
From: you at your.com
Subject: form submission

Thank you for your form submission.





More information about the NZLUG mailing list