Link to home
Start Free TrialLog in
Avatar of Rowby Goren
Rowby GorenFlag for United States of America

asked on

Handle multiple email receipients with checkmarks

Hello!

I would appreciate your help on this one:

Website hosted on UNIX system. I need the ability for the web visitor to be able to check off the names of the people they want their email sent to.

Here's the link:

http://calcommuters.org/bay_area/email.html

There are both individual email addresses they can send it to, OR (as you will see) one checkmark that lets them send their email to everyone on the list.  

Be aware that while the form fields are named, the form itself has not yet been properly set up -- that is it's a dummy page, and I will need to properly link the form to the form handler in the cgi bin.  I have not yet selected a form handler.  You might want to offer me a suggestion for that too.

Again, this page was not done by me -- so the form itself it not properly set up -- I can fix that.  It's the multiple recipients issue I need to solve.


The solution needs to be an html solution -- no asp or anything like that.  I have access to the cgi-bin.

Also, as a minor P.S. the result of the form will also need to be sent to a folder on the server in a comma deliminated file so that it can later be exported (downloaded) to a offline database.

Thanks

Rowby

P.S.  The first Name,  lastname and city of residence fields will NOT be included in the email.  Those fields will, however, be sent to the server's folder for later download to the offline database.
Avatar of djbusychild
djbusychild

what exactly are you asking for?

given you have a form like the following

<html>
<head>
</head>
<body>
<form method=get action=#>
<input type=checkbox name=bob value="bob@aol.com">Bob<br />
<input type=checkbox name=john value="john@aol.com">John<br />
<input type=submit>
</form>
</body>
</html>

when you hit submit you'll see that the querystring
shows the name and value pair of the fields that were checked. you could change this to POST if you
feel querystring's limitation of character count will not work for you.

on the serverside you can use scripting languages such as python to process the submitted values and
send e-mail to all the addresses.
Avatar of Rowby Goren

ASKER

Hi,

My programming knowledge is limited to say the least.  So forgive me as I attempt to respond.  I think your answer is helping me get closer to solving my question.  

Since I don't know phython, but I have used perl scripts to process my email forms, can I use a standard perl script to process the submitted values?  

If your answer is yes, then, should I post a sample (simple) perl email form handler next and you can tell me my next step in making this form work.

Based on your comment I think I am on my way to a resolution, but I need to make sure the last part of the puzzle is working.

There are a number of perl form handlers out there, such as the ones in Matts Script archives, which are very popular.  If you are familar with the Matt Scripts or a similar one let me know and "we" could add the neceessary "submit" info to your following suggested solution:

html>
<head>
</head>
<body>
<form method=get action=#>
<input type=checkbox name=bob value="bob@aol.com">Bob<br />
<input type=checkbox name=john value="john@aol.com">John<br />
<input type=submit>
</form>
</body>

PLEASE BARE WITH ME -- I am just wanting to make sure that I have all the pieces in the puzzle working so I can finally add the working form to the website. :)

I appreciate what looks like will (hopefully) be the solution I need.

Regards,

Rowby
I have increased the points to 250
Hi Rowby:

Let me get this correctly. You want a Perl/CGI script that will mail one/many/all (depending on the form selection) and also store the information a text database on the server. Correct me if I am wrong. If this is it.... I will provide you a script right away.
YEs, that is exactly it!

:) :) :)

Rowby
Avatar of Eric - Netminder
You should be able to use formmail.pl from Matt's Script Archives. Works like a charm, and is pretty easy to understand and modify (he gives you instructions).

Besides the modifications to the page that djbusychild suggested, the only real problem is writing something that will look at the various values (email addresses) from the page and assign them sequentially to the recipient variable in the sendmail script... maybe rag2000 can help you with that, because I'm not a perl programmer...
ok, doing your script, will post it shortly
Thanks!
Thanks!
Hi raq,

I look forward to your solution!

Rowby
rowby,

sorry for the delay... i had to go out for some urgent work... anyways, here is the corrected html page (your existing page was....) and the script. let me know if you have any problems.


#!/usr/bin/perl

     $|++;
     use CGI;

     $cgi=new CGI;
     $emailAddress=$cgi->param('emailAddress');
     $firstName=$cgi->param('firstName');
     $firstName=~s/'/''/g;
     $lastName=$cgi->param('lastName');
     $lastName=~s/'/''/g;
     $cityResidence=$cgi->param('cityResidence');
     $cityResidence=~s/'/''/g;
     $emailSubject=$cgi->param('emailSubject');
     $emailSubject=~s/'/''/g;
     $yourMessage=$cgi->param('yourMessage');
     $yourMessage=~s/'/''/g;

     open(MAIL, "|/usr/lib/sendmail -t");
     print MAIL "From: $emailAddress\n";
     print MAIL "To: you\@yourDomain.com\n";
     print MAIL "Subject: $emailSubject\n";
     print MAIL "\n";
     print MAIL "$yourMessage";
     close MAIL;

     for($e=1;$e<24;$e++){
          $s="checkbox$e";
          $mailPerson=$cgi->param($s);
          if($mailPerson ne ""){
               open(MAIL, "|/usr/lib/sendmail -t");
               print MAIL "From: 'California Commuters Alliance'<you\@yourDomain.com>\n";
               print MAIL "To: $mailPerson\n";
               print MAIL "Subject: $emailSubject\n";
               print MAIL "\n";
               print MAIL "$yourMessage";
               close MAIL;
               $mailedTo.="$mailPerson|";
          }
     }

     open (LOGG, ">>/absolute/path/to/your/textDb.txt");
     print LOGG "$emailAddress|$firstName|$lastName|$cityResidence|$emailSubject|$yourMessage|$mailedTo\n";
     close (LOGG);

     print "Content-type: text/html \n\n";
     open(HANDLE,"/absolute/path/to/your/thanks.html") || print "could not open thanks";
     while(<HANDLE>){
          $_=~s/grfx/..\/grfx/g;
          print $_;
     }
i am posting the corrected html page... your page is in a mess
Hi,

Thanks for the script.  

I don't see the corrected html page here.  I'm not sure if it's important I have it to make your script work.  

If you have it handy please post it. Otherwise I will fix the HTML myself.

Again thanks. I'll wait to see if  you post the HTML page.  And award you the points friday.

Thanks again,

Rowby
there were too many <form> tags in the html... i was just correcting those... a little busy that's why it's taking a little time
try this corrected html form page

<html>
<head>
<title>California Commuters Alliance - Get Loud! Get Heard!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function CheckAll(){
if(document.email_form.checkbox0.checked==1){
  for(var i=0; i < document.email_form.length; i++) {
      document.email_form.elements[i].checked=1;
  }
}
if(document.email_form.checkbox0.checked==0){
  for(var i=0; i < document.email_form.length; i++) {
      document.email_form.elements[i].checked=0;
  }
}
}
//-->
</script>
</head>
<body bgcolor="#FFCC33" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../images/but_home_on.gif','../images/but_know_on.gif','../images/but_fund_on.gif','../images/but_busi_on.gif','../images/but_wome_on.gif','../images/but_poli_on.gif','../images/but_tran_on.gif','../images/but_traf_on.gif','../images/but_geti_on.gif','../images/but_baya_on.gif','../images/but_emai_on.gif','../images/but_talk_on.gif','../images/but_sacr_on.gif','../images/but_fres_on.gif','../images/but_stat_on.gif','../images/but_soun_on.gif','../images/but_samp_on.gif','../images/but_take_on.gif','../images/but_faqs_on.gif','../images/but_radi_on.gif','../images/but_news_on.gif','../images/but_part_on.gif','../images/but_link_on.gif','../images/but_priv_on.gif','../images/but_site_on.gif','../images/but_cont_on.gif','../images/but_memb_on.gif')" link="#CC0000" vlink="#CC0000" alink="#CC0000">
<table width="700" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  <tr>
    <td><img src="../images/banner.gif" width="700" height="117" usemap="#Map" border="0"><map name="Map"><area shape="poly" coords="338,56" href="#"><area shape="rect" coords="301,58,436,86" href="../sound_off.html"></map></td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="150" bgcolor="#FFCC33" align="center" valign="top" bordercolor="0">
            <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr valign="top" align="right">
                <td>
                  <p><a href="../index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Home','','../images/but_home_on.gif',1)"><img name="Home" border="0" src="../images/but_home_off.gif" width="140" height="19"><br>
                    </a><a href="../should_know.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('What You Should Know','','../images/but_know_on.gif',1)"><img name="What You Should Know" border="0" src="../images/but_know_off.gif" width="140" height="19"><br>
                    </a><a href="../funding_debate.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('The Funding Debate','','../images/but_fund_on.gif',1)"><img name="The Funding Debate" border="0" src="../images/but_fund_off.gif" width="140" height="19"><br>
                    </a><a href="../business_people.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Business People','','../images/but_busi_on.gif',1)"><img name="For Business People" border="0" src="../images/but_busi_off.gif" width="140" height="19"><br>
                    </a><a href="../women.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Women','','../images/but_wome_on.gif',1)"><img name="For Women" border="0" src="../images/but_wome_off.gif" width="140" height="19"><br>
                    </a><a href="../policy_makers.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Policy Makers','','../images/but_poli_on.gif',1)"><img name="For Policy Makers" border="0" src="../images/but_poli_off.gif" width="140" height="19"><br>
                    </a><a href="../transit_riders.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Transit Riders','','../images/but_tran_on.gif',1)"><img name="For Transit Riders" border="0" src="../images/but_tran_off.gif" width="140" height="19"><br>
                    </a><a href="../traffic_economy.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Traffic &amp; the Economy','','../images/but_traf_on.gif',1)"><img name="Traffic & the Economy" border="0" src="../images/but_traf_off.gif" width="140" height="19"><br>
                    <br>
                    </a><a href="../get_involved.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Get Involved','','../images/but_geti_on.gif',1)"><img name="Get Involved" border="0" src="../images/but_geti_off.gif" width="140" height="19"><br>
                    </a><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Bay Area','','../images/but_baya_on.gif',1)"><img name="Bay Area" border="0" src="../images/but_baya_off.gif" width="140" height="19"><br>
                    </a><a href="email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail','','../images/but_emai_on.gif',1)"><img src="../images/but_emai_on.gif" width="123" height="19" border="0"><br>
                    </a><a href="talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points','','../images/but_talk_on.gif',1)"><img name="Talking Points" border="0" src="../images/but_talk_off.gif" width="123" height="19"><br>
                    </a><a href="../sacramento/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Sacramento','','../images/but_sacr_on.gif',1)"><img name="Sacramento" border="0" src="../images/but_sacr_off.gif" width="140" height="19"><br>
                    </a><a href="../sacramento/email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail1','','../images/but_emai_on.gif',1)"><img name="E-mail1" border="0" src="../images/but_emai_off.gif" width="123" height="19"><br>
                    </a><a href="../sacramento/talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points1','','../images/but_talk_on.gif',1)"><img name="Talking Points1" border="0" src="../images/but_talk_off.gif" width="123" height="19"></a><br>
                    <a href="../fresno_merced/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Fresno/Merced','','../images/but_fres_on.gif',1)"><img name="Fresno/Merced" border="0" src="../images/but_fres_off.gif" width="140" height="19"><br>
                    </a><a href="../fresno_merced/email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail11','','../images/but_emai_on.gif',1)"><img name="E-mail11" border="0" src="../images/but_emai_off.gif" width="123" height="19"><br>
                    </a><a href="../fresno_merced/talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points11','','../images/but_talk_on.gif',1)"><img name="Talking Points11" border="0" src="../images/but_talk_off.gif" width="123" height="20"><br>
                    </a><a href="../state/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('State','','../images/but_stat_on.gif',1)"><img name="State" border="0" src="../images/but_stat_off.gif" width="140" height="19"><br>
                    </a><a href="../state/email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail111','','../images/but_emai_on.gif',1)"><img name="E-mail111" border="0" src="../images/but_emai_off.gif" width="123" height="19"><br>
                    </a><a href="../state/talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points111','','../images/but_talk_on.gif',1)"><img name="Talking Points111" border="0" src="../images/but_talk_off.gif" width="123" height="19"><br>
                    </a><br>
                    <a href="../sound_off.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Sound Off Now','','../images/but_soun_on.gif',1)"><img name="Sound Off Now" border="0" src="../images/but_soun_off.gif" width="140" height="19"><br>
                    </a><a href="../sample_email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Sample E-mails','','../images/but_samp_on.gif',1)"><img name="Sample E-mails" border="0" src="../images/but_samp_off.gif" width="140" height="19"><br>
                    </a><br>
                    <a href="../survey.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Take Our Survey','','../images/but_take_on.gif',1)"><img name="Take Our Survey" border="0" src="../images/but_take_off.gif" width="140" height="19"><br>
                    </a><a href="../faqs.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('FAQs &amp; Myths','','../images/but_faqs_on.gif',1)"><img name="FAQs & Myths" border="0" src="../images/but_faqs_off.gif" width="140" height="19"><br>
                    </a><a href="../radio.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Radio','','../images/but_radi_on.gif',1)"><img name="Radio" border="0" src="../images/but_radi_off.gif" width="140" height="19"><br>
                    </a><a href="../news.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('News','','../images/but_news_on.gif',1)"><img name="News" border="0" src="../images/but_news_off.gif" width="140" height="19"><br>
                    </a><a href="../partners.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Partners','','../images/but_part_on.gif',1)"><img name="Partners" border="0" src="../images/but_part_off.gif" width="140" height="19"><br>
                    </a><a href="../links.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Links','','../images/but_link_on.gif',1)"><img name="Links" border="0" src="../images/but_link_off.gif" width="140" height="19"><br>
                    </a><a href="../privacy.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Privacy &amp; Membership','','../images/but_priv_on.gif',1)"><img name="Privacy & Membership" border="0" src="../images/but_priv_off.gif" width="140" height="19"><br>
                    </a><a href="../membership.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Membership','','../images/but_memb_on.gif',1)"><img name="Membership" border="0" src="../images/but_memb_off.gif" width="140" height="19"></a><a href="../privacy.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Privacy &amp; Membership','','../images/but_priv_on.gif',1)"><br>
                    </a><a href="../about.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About This Site','','../images/but_site_on.gif',1)"><img name="About This Site" border="0" src="../images/but_site_off.gif" width="140" height="19"><br>
                    </a><a href="../contact_us.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Contact Us','','../images/but_cont_on.gif',1)"><img name="Contact Us" border="0" src="../images/but_cont_off.gif" width="140" height="19"></a></p>
                  <p><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('News','','../images/but_news_on.gif',1)"><br>
                    </a></p>
                </td>
              </tr>
            </table>
            <p>&nbsp;</p>
            <p>&nbsp; </p>
            </td>
          <td width="400" align="center" valign="top">
            <table width="90%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td>
                  <p align="left"><font face="Arial, Helvetica, sans-serif" size="+2" color="#CC0000"><b><img src="../images/title_bayemail.gif" width="247" height="24"><br>
                    <br>
                    Here Is Your Chance </b></font></p>
                  <p><font face="Arial, Helvetica, sans-serif" size="3" color="#000000">Let
                    Bay Area transportation officials know what you think should
                    be done about the worsening condition of the roads and highways
                    you use day in and day out. Just select which officials you
                    would like to receive your e-mail, draft your message, sign,
                    and send. Your point of view matters and so does the personal
                    toll congestion has taken on you and your loved ones. </font></p>
                  <p><font face="Arial, Helvetica, sans-serif" size="3" color="#000000">For
                    facts and figures to help you to construct your argument,
                    go to our <a href="talking_points.html">Bay Area talking points</a>
                    page. Also, look at our <a href="../sample_email.html">sample
                    e-mails</a>. </font></p>
                              <form name="email_form" action="cgi-bin/multipleRecipients.cgi" method="post">
                  <table width="95%" border="1" cellspacing="0" cellpadding="5" align="center">
                    <tr align="left" valign="top">
                      <td colspan="2"><b><font color="#000099" size="5" face="Arial, Helvetica, sans-serif">Sound
                        Off Now!<br>
                        </font></b><font color="#666666" size="2" face="Arial, Helvetica, sans-serif">*
                        denotes required fields that are needed in order for your
                        e-mail to be validated by the recipient, allowing the
                        opportunity for a response, and lets politicians know
                        where you vote. For more information, please see our <a href="../privacy.html">Privacy
                        Policy</a>.</font></td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">*Enter
                        your e-mail address:</font></td>
                      <td>
                       
                          <input type="text" name="emailAddress">
                       
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">Enter
                        your First Name:</font></td>
                      <td>
                          <input type="text" name="firstName">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">Enter
                        your Last Name:</font></td>
                      <td>
                          <input type="text" name="lastName">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">*Enter
                        your city of residence:</font></td>
                      <td>
                          <input type="text" name="cityResidence">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">Please
                        enter the subject of your e-mail:</font></td>
                      <td>
                          <input type="text" name="emailSubject">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td colspan="2">
                        <div align="center"><font face="Arial, Helvetica, sans-serif" size="3" color="#000099">Enter
                          Your Message:</font><font face="Arial, Helvetica, sans-serif" size="2" color="#000099"><br>
                          Need Help with Your Message? Visit the <a href="../sample_email.html">Sample
                          E-mail</a> page. <br>
                          </font>
                            <textarea name="yourMessage" cols="50" rows="10"></textarea>
                        </div>
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td colspan="2">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr align="left" valign="top">
                            <td>&nbsp;</td>
                            <td>
                              <p align="left"><b><font face="Arial, Helvetica, sans-serif" size="+2" color="#CC0000">Check
                                officials you would like to send e-mail to below:</font></b></p>
                            </td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input onclick="CheckAll()" type="checkbox" name="checkbox0" value="all">
                            </td>
                            <td bgcolor="#FFFFFF"><font color="#3300CC" face="Arial, Helvetica, sans-serif" size="3"><b>CHECK
                              THE BOX HERE TO SEND E-MAIL TO ALL ADDRESSES LISTED
                              BELOW </b></font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>&nbsp;</td>
                            <td><font color="#3300CC" face="Arial, Helvetica, sans-serif" size="3"><b><i>OR
                              CHECK OFF ADDRESSES INDIVIDUALLY:</i></b></font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                            </td>
                            <td bgcolor="#FFCC33"><font face="Arial, Helvetica, sans-serif" size="3" color="#3300CC"><b>Metropolitan
                              Tansportation Commission:</b></font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox1" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Metropolitan
                              Transportation Commission Chair Sharon. J. Brown</font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              sharonsell@aol.com </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox2" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Vice-Chair
                              Scott Haggerty, Alameda County </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              district1@co.alameda.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox3" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Tom Ammiano, San Francisco </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              tomammiano@ci.sf.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox4" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Ralph J. Appezzato, City of Alameda</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              rappezza@ci.alameda.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox5" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Keith Axtell, Dept. of Housing and Urban Development
                              </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              keith_e._axtell@hud.gov </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox6" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              James T. Beall, Jr., Santa Clara County </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              james_beall@qmgate4.bos.Co.Santa-Clara.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox7" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Mark DeSaulnier, Contra Costa County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              dist4@supervisors.co.contra-costa.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox8" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Bill Dodd, Napa County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              bdodd@co.napa.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox9" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Dorene Giacopini, U.S. Dept. of Transportation</font>
                              <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              dgiaco@mtc.ca.gov </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox10" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Barbara Kaufman, Bay Conservation and Development
                              Commission</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              BarbaraKaufman@aol.com </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox11" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Stephen Kinsey, Marin County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              skinsey@marin.org </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox12" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Sue Lempert, cities of San Mateo County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              lempert@ci.sanmateo.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox13" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              John McLemore, cities of Santa Clara County</font>
                              <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              mayor@ci.santa-clara.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox14" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Michael Nevin, representing San Mateo County</font>
                              <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              mnevin@co.sanmateo.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox15" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Jon Rubin, San Francisco </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              bay2171@aol.com </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox16" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              James P. Spering, Solano County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              jimzspering@cs.com </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox17" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Pamela Torliatt, Association of Bay Area Governments
                              </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              Ptorliatt@aol.com </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox18" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Sharon Wright, representing Sonoma County and cities
                              </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              swright@ci.santa-rosa.ca.us </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox19" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner
                              Harry Yahata, Caltrans</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>
                              harry_yahata@dot.ca.gov </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox20" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">MTC
                              Executive Director Steve Heminger </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              Sheminger@mtc.dst.ca.gov </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox21" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">State
                              Senator Don Perata </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              Don.Perata@sen.ca.gov </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox22" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">State
                              Senator Tom Torlakson </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              Tom.Torlakson@sen.ca.gov </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox23" value="checkbox">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Caltrans
                              District 4 </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
                              Caltrans4@dot.ca.gov </font></td>
                          </tr>
                        </table>
         
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td colspan="2">
                          <div align="right">
                            <table width="100%" border="0" cellspacing="0" cellpadding="5">
                              <tr>
                                <td width="50%">
                                  <div align="right">
                                    <input type="submit" name="submitbayarea" value="Submit">
                                  </div>
                                </td>
                                <td width="50%">
                                  <input type="reset" name="resetbayarea" value="Reset">
                                </td>
                              </tr>
                            </table>
                          </div>
                      </td>
                    </tr>
                  </table>
                        </form>
                </td>
              </tr>
            </table>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
          </td>
          <td width="150" valign="top">
            <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td>
                  <p><a href="../get_involved.html"><img src="../images/bug_involved.gif" width="140" height="55" border="0"></a><br>
                    <font face="Arial, Helvetica, sans-serif" size="3"><br>
                    <a href="../get_involved.html">Click here</a> to learn how
                    you can improve transportation.</font> </p>
                  <hr>
                  <p><a href="../should_know.html"><img src="../images/bug_know.gif" width="140" height="55" border="0"></a><br>
                    <font face="Arial, Helvetica, sans-serif" size="3"><br>
                    <a href="../should_know.html">Click here</a> to learn about
                    our roads crisis.</font></p>
                  <hr>
                  <p><a href="../traffic_economy.html"><img src="../images/bug_traffic.gif" width="140" height="55" border="0"></a></p>
                  <p><font face="Arial, Helvetica, sans-serif" size="3"><a href="../traffic_economy.html">Click
                    here</a> to find out how congestion and bad roads are hurting
                    the economy.</font></p>
                  <hr>
                  <p><a href="../survey.html"><img src="../images/bug_survey.gif" width="140" height="55" border="0"></a><br>
                    <font face="Arial, Helvetica, sans-serif" size="3"><br>
                    <a href="../survey.html">Click here</a> and help us learn
                    more about our visitors.</font></p>
                </td>
              </tr>
            </table>
            <p>&nbsp;</p>
            </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
Ooooops.....   a little correction... forget to insert the email addresses of the officials as the values of the checkboxes, remember you need to send out the mails.

I have tested and can give you the link to it working on my server.

<html>
<head>
<title>California Commuters Alliance - Get Loud! Get Heard!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function CheckAll(){
if(document.email_form.checkbox0.checked==1){
  for(var i=0; i < document.email_form.length; i++) {
      document.email_form.elements[i].checked=1;
  }
}
if(document.email_form.checkbox0.checked==0){
  for(var i=0; i < document.email_form.length; i++) {
      document.email_form.elements[i].checked=0;
  }
}
}
//-->
</script>
</head>
<body bgcolor="#FFCC33" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../images/but_home_on.gif','../images/but_know_on.gif','../images/but_fund_on.gif','../images/but_busi_on.gif','../images/but_wome_on.gif','../images/but_poli_on.gif','../images/but_tran_on.gif','../images/but_traf_on.gif','../images/but_geti_on.gif','../images/but_baya_on.gif','../images/but_emai_on.gif','../images/but_talk_on.gif','../images/but_sacr_on.gif','../images/but_fres_on.gif','../images/but_stat_on.gif','../images/but_soun_on.gif','../images/but_samp_on.gif','../images/but_take_on.gif','../images/but_faqs_on.gif','../images/but_radi_on.gif','../images/but_news_on.gif','../images/but_part_on.gif','../images/but_link_on.gif','../images/but_priv_on.gif','../images/but_site_on.gif','../images/but_cont_on.gif','../images/but_memb_on.gif')" link="#CC0000" vlink="#CC0000" alink="#CC0000">
<table width="700" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  <tr>
    <td><img src="../images/banner.gif" width="700" height="117" usemap="#Map" border="0"><map name="Map"><area shape="poly" coords="338,56" href="#"><area shape="rect" coords="301,58,436,86" href="../sound_off.html"></map></td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="150" bgcolor="#FFCC33" align="center" valign="top" bordercolor="0">
            <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr valign="top" align="right">
                <td>
                  <p><a href="../index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Home','','../images/but_home_on.gif',1)"><img name="Home" border="0" src="../images/but_home_off.gif" width="140" height="19"><br>
                    </a><a href="../should_know.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('What You Should Know','','../images/but_know_on.gif',1)"><img name="What You Should Know" border="0" src="../images/but_know_off.gif" width="140" height="19"><br>
                    </a><a href="../funding_debate.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('The Funding Debate','','../images/but_fund_on.gif',1)"><img name="The Funding Debate" border="0" src="../images/but_fund_off.gif" width="140" height="19"><br>
                    </a><a href="../business_people.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Business People','','../images/but_busi_on.gif',1)"><img name="For Business People" border="0" src="../images/but_busi_off.gif" width="140" height="19"><br>
                    </a><a href="../women.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Women','','../images/but_wome_on.gif',1)"><img name="For Women" border="0" src="../images/but_wome_off.gif" width="140" height="19"><br>
                    </a><a href="../policy_makers.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Policy Makers','','../images/but_poli_on.gif',1)"><img name="For Policy Makers" border="0" src="../images/but_poli_off.gif" width="140" height="19"><br>
                    </a><a href="../transit_riders.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('For Transit Riders','','../images/but_tran_on.gif',1)"><img name="For Transit Riders" border="0" src="../images/but_tran_off.gif" width="140" height="19"><br>
                    </a><a href="../traffic_economy.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Traffic &amp; the Economy','','../images/but_traf_on.gif',1)"><img name="Traffic & the Economy" border="0" src="../images/but_traf_off.gif" width="140" height="19"><br>
                    <br>
                    </a><a href="../get_involved.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Get Involved','','../images/but_geti_on.gif',1)"><img name="Get Involved" border="0" src="../images/but_geti_off.gif" width="140" height="19"><br>
                    </a><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Bay Area','','../images/but_baya_on.gif',1)"><img name="Bay Area" border="0" src="../images/but_baya_off.gif" width="140" height="19"><br>
                    </a><a href="email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail','','../images/but_emai_on.gif',1)"><img src="../images/but_emai_on.gif" width="123" height="19" border="0"><br>
                    </a><a href="talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points','','../images/but_talk_on.gif',1)"><img name="Talking Points" border="0" src="../images/but_talk_off.gif" width="123" height="19"><br>
                    </a><a href="../sacramento/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Sacramento','','../images/but_sacr_on.gif',1)"><img name="Sacramento" border="0" src="../images/but_sacr_off.gif" width="140" height="19"><br>
                    </a><a href="../sacramento/email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail1','','../images/but_emai_on.gif',1)"><img name="E-mail1" border="0" src="../images/but_emai_off.gif" width="123" height="19"><br>
                    </a><a href="../sacramento/talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points1','','../images/but_talk_on.gif',1)"><img name="Talking Points1" border="0" src="../images/but_talk_off.gif" width="123" height="19"></a><br>
                    <a href="../fresno_merced/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Fresno/Merced','','../images/but_fres_on.gif',1)"><img name="Fresno/Merced" border="0" src="../images/but_fres_off.gif" width="140" height="19"><br>
                    </a><a href="../fresno_merced/email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail11','','../images/but_emai_on.gif',1)"><img name="E-mail11" border="0" src="../images/but_emai_off.gif" width="123" height="19"><br>
                    </a><a href="../fresno_merced/talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points11','','../images/but_talk_on.gif',1)"><img name="Talking Points11" border="0" src="../images/but_talk_off.gif" width="123" height="20"><br>
                    </a><a href="../state/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('State','','../images/but_stat_on.gif',1)"><img name="State" border="0" src="../images/but_stat_off.gif" width="140" height="19"><br>
                    </a><a href="../state/email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-mail111','','../images/but_emai_on.gif',1)"><img name="E-mail111" border="0" src="../images/but_emai_off.gif" width="123" height="19"><br>
                    </a><a href="../state/talking_points.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Talking Points111','','../images/but_talk_on.gif',1)"><img name="Talking Points111" border="0" src="../images/but_talk_off.gif" width="123" height="19"><br>
                    </a><br>
                    <a href="../sound_off.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Sound Off Now','','../images/but_soun_on.gif',1)"><img name="Sound Off Now" border="0" src="../images/but_soun_off.gif" width="140" height="19"><br>
                    </a><a href="../sample_email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Sample E-mails','','../images/but_samp_on.gif',1)"><img name="Sample E-mails" border="0" src="../images/but_samp_off.gif" width="140" height="19"><br>
                    </a><br>
                    <a href="../survey.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Take Our Survey','','../images/but_take_on.gif',1)"><img name="Take Our Survey" border="0" src="../images/but_take_off.gif" width="140" height="19"><br>
                    </a><a href="../faqs.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('FAQs &amp; Myths','','../images/but_faqs_on.gif',1)"><img name="FAQs & Myths" border="0" src="../images/but_faqs_off.gif" width="140" height="19"><br>
                    </a><a href="../radio.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Radio','','../images/but_radi_on.gif',1)"><img name="Radio" border="0" src="../images/but_radi_off.gif" width="140" height="19"><br>
                    </a><a href="../news.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('News','','../images/but_news_on.gif',1)"><img name="News" border="0" src="../images/but_news_off.gif" width="140" height="19"><br>
                    </a><a href="../partners.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Partners','','../images/but_part_on.gif',1)"><img name="Partners" border="0" src="../images/but_part_off.gif" width="140" height="19"><br>
                    </a><a href="../links.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Links','','../images/but_link_on.gif',1)"><img name="Links" border="0" src="../images/but_link_off.gif" width="140" height="19"><br>
                    </a><a href="../privacy.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Privacy &amp; Membership','','../images/but_priv_on.gif',1)"><img name="Privacy & Membership" border="0" src="../images/but_priv_off.gif" width="140" height="19"><br>
                    </a><a href="../membership.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Membership','','../images/but_memb_on.gif',1)"><img name="Membership" border="0" src="../images/but_memb_off.gif" width="140" height="19"></a><a href="../privacy.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Privacy &amp; Membership','','../images/but_priv_on.gif',1)"><br>
                    </a><a href="../about.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About This Site','','../images/but_site_on.gif',1)"><img name="About This Site" border="0" src="../images/but_site_off.gif" width="140" height="19"><br>
                    </a><a href="../contact_us.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Contact Us','','../images/but_cont_on.gif',1)"><img name="Contact Us" border="0" src="../images/but_cont_off.gif" width="140" height="19"></a></p>
                  <p><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('News','','../images/but_news_on.gif',1)"><br>
                    </a></p>
                </td>
              </tr>
            </table>
            <p>&nbsp;</p>
            <p>&nbsp; </p>
            </td>
          <td width="400" align="center" valign="top">
            <table width="90%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td>
                  <p align="left"><font face="Arial, Helvetica, sans-serif" size="+2" color="#CC0000"><b><img src="../images/title_bayemail.gif" width="247" height="24"><br>
                    <br>
                    Here Is Your Chance </b></font></p>
                  <p><font face="Arial, Helvetica, sans-serif" size="3" color="#000000">Let
                    Bay Area transportation officials know what you think should
                    be done about the worsening condition of the roads and highways
                    you use day in and day out. Just select which officials you
                    would like to receive your e-mail, draft your message, sign,
                    and send. Your point of view matters and so does the personal
                    toll congestion has taken on you and your loved ones. </font></p>
                  <p><font face="Arial, Helvetica, sans-serif" size="3" color="#000000">For
                    facts and figures to help you to construct your argument,
                    go to our <a href="talking_points.html">Bay Area talking points</a>
                    page. Also, look at our <a href="../sample_email.html">sample
                    e-mails</a>. </font></p>
                              <form name="email_form" action="cgi-local/multipleRecipients.cgi" method="post">
                  <table width="95%" border="1" cellspacing="0" cellpadding="5" align="center">
                    <tr align="left" valign="top">
                      <td colspan="2"><b><font color="#000099" size="5" face="Arial, Helvetica, sans-serif">Sound
                        Off Now!<br>
                        </font></b><font color="#666666" size="2" face="Arial, Helvetica, sans-serif">*
                        denotes required fields that are needed in order for your
                        e-mail to be validated by the recipient, allowing the
                        opportunity for a response, and lets politicians know
                        where you vote. For more information, please see our <a href="../privacy.html">Privacy
                        Policy</a>.</font></td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">*Enter
                        your e-mail address:</font></td>
                      <td>
                       
                          <input type="text" name="emailAddress">
                       
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">Enter
                        your First Name:</font></td>
                      <td>
                          <input type="text" name="firstName">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">Enter
                        your Last Name:</font></td>
                      <td>
                          <input type="text" name="lastName">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">*Enter
                        your city of residence:</font></td>
                      <td>
                          <input type="text" name="cityResidence">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td><font face="Arial, Helvetica, sans-serif" size="2">Please
                        enter the subject of your e-mail:</font></td>
                      <td>
                          <input type="text" name="emailSubject">
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td colspan="2">
                        <div align="center"><font face="Arial, Helvetica, sans-serif" size="3" color="#000099">Enter
                          Your Message:</font><font face="Arial, Helvetica, sans-serif" size="2" color="#000099"><br>
                          Need Help with Your Message? Visit the <a href="../sample_email.html">Sample
                          E-mail</a> page. <br>
                          </font>
                            <textarea name="yourMessage" cols="50" rows="10"></textarea>
                        </div>
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td colspan="2">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr align="left" valign="top">
                            <td>&nbsp;</td>
                            <td>
                              <p align="left"><b><font face="Arial, Helvetica, sans-serif" size="+2" color="#CC0000">Check
                                officials you would like to send e-mail to below:</font></b></p>
                            </td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input onclick="CheckAll()" type="checkbox" name="checkbox0" value="all">
                            </td>
                            <td bgcolor="#FFFFFF"><font color="#3300CC" face="Arial, Helvetica, sans-serif" size="3"><b>CHECK
                              THE BOX HERE TO SEND E-MAIL TO ALL ADDRESSES LISTED
                              BELOW </b></font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>&nbsp;</td>
                            <td><font color="#3300CC" face="Arial, Helvetica, sans-serif" size="3"><b><i>OR
                              CHECK OFF ADDRESSES INDIVIDUALLY:</i></b></font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                            </td>
                            <td bgcolor="#FFCC33"><font face="Arial, Helvetica, sans-serif" size="3" color="#3300CC"><b>Metropolitan
                              Tansportation Commission:</b></font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox1" value="sharonsell@aol.com">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Metropolitan Transportation Commission Chair Sharon. J. Brown</font><font face="Arial, Helvetica, sans-serif" size="2"><br>sharonsell@aol.com</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox2" value="district1@co.alameda.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Vice-Chair Scott Haggerty, Alameda County </font><font face="Arial, Helvetica, sans-serif" size="2"><br>district1@co.alameda.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox3" value="tomammiano@ci.sf.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Tom Ammiano, San Francisco </font><font face="Arial, Helvetica, sans-serif" size="2"><br>tomammiano@ci.sf.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox4" value="rappezza@ci.alameda.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Ralph J. Appezzato, City of Alameda</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>rappezza@ci.alameda.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox5" value="keith_e._axtell@hud.gov">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Keith Axtell, Dept. of Housing and Urban Development            </font><font face="Arial, Helvetica, sans-serif" size="2"><br>keith_e._axtell@hud.gov </font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox6" value="james_beall@qmgate4.bos.Co.Santa-Clara.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner James T. Beall, Jr., Santa Clara County </font><font face="Arial, Helvetica, sans-serif" size="2"><br>james_beall@qmgate4.bos.Co.Santa-Clara.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox7" value="dist4@supervisors.co.contra-costa.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Mark DeSaulnier, Contra Costa County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>dist4@supervisors.co.contra-costa.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox8" value="bdodd@co.napa.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Bill Dodd, Napa County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>bdodd@co.napa.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox9" value="dgiaco@mtc.ca.gov">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Dorene Giacopini, U.S. Dept. of Transportation</font><font face="Arial, Helvetica, sans-serif" size="2"><br>dgiaco@mtc.ca.gov</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox10" value="BarbaraKaufman@aol.com">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Barbara Kaufman, Bay Conservation and Development           Commission</font><font face="Arial, Helvetica, sans-serif" size="2"><br>                 BarbaraKaufman@aol.com</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox11" value="skinsey@marin.org">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Stephen Kinsey, Marin County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>skinsey@marin.org</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox12" value="lempert@ci.sanmateo.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Sue Lempert, cities of San Mateo County</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>lempert@ci.sanmateo.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox13" value="mayor@ci.santa-clara.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner John McLemore, cities of Santa Clara County</font><font face="Arial, Helvetica, sans-serif" size="2"><br>mayor@ci.santa-clara.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox14" value="mnevin@co.sanmateo.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Michael Nevin, representing San Mateo County</font><font face="Arial, Helvetica, sans-serif" size="2"><br>mnevin@co.sanmateo.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox15" value="bay2171@aol.com">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Jon Rubin, San Francisco </font><font face="Arial, Helvetica, sans-serif" size="2"><br>bay2171@aol.com</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox16" value="jimzspering@cs.com">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner James P. Spering, Solano County</font><font face="Arial, Helvetica, sans-serif" size="2"><br>jimzspering@cs.com</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox17" value="Ptorliatt@aol.com">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Pamela Torliatt, Association of Bay Area Governments</font><font face="Arial, Helvetica, sans-serif" size="2"><br>Ptorliatt@aol.com</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox18" value="swright@ci.santa-rosa.ca.us">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Sharon Wright, representing Sonoma County and cities</font><font face="Arial, Helvetica, sans-serif" size="2"><br>swright@ci.santa-rosa.ca.us</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox19" value="harry_yahata@dot.ca.gov">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Commissioner Harry Yahata, Caltrans</font> <font face="Arial, Helvetica, sans-serif" size="2"><br>harry_yahata@dot.ca.gov</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox20" value="Sheminger@mtc.dst.ca.gov">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">MTC Executive Director Steve Heminger </font><font face="Arial, Helvetica, sans-serif" size="2"><br>Sheminger@mtc.dst.ca.gov</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox21" value="Don.Perata@sen.ca.gov">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">State Senator Don Perata </font><font face="Arial, Helvetica, sans-serif" size="2"><br>Don.Perata@sen.ca.gov</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox22" value="Tom.Torlakson@sen.ca.gov">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">State Senator Tom Torlakson </font><font face="Arial, Helvetica, sans-serif" size="2"><br>Tom.Torlakson@sen.ca.gov</font></td>
                          </tr>
                          <tr align="left" valign="top">
                            <td>
                                <input type="checkbox" name="checkbox23" value="Caltrans4@dot.ca.gov">
                            </td>
                            <td><font color="#CC0000" face="Arial, Helvetica, sans-serif" size="2">Caltrans District 4 </font><font face="Arial, Helvetica, sans-serif" size="2"><br>
Caltrans4@dot.ca.gov</font></td>
                          </tr>
                        </table>
         
                      </td>
                    </tr>
                    <tr align="left" valign="top">
                      <td colspan="2">
                          <div align="right">
                            <table width="100%" border="0" cellspacing="0" cellpadding="5">
                              <tr>
                                <td width="50%">
                                  <div align="right">
                                    <input type="submit" name="submitbayarea" value="Submit">
                                  </div>
                                </td>
                                <td width="50%">
                                  <input type="reset" name="resetbayarea" value="Reset">
                                </td>
                              </tr>
                            </table>
                          </div>
                      </td>
                    </tr>
                  </table>
                        </form>
                </td>
              </tr>
            </table>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
          </td>
          <td width="150" valign="top">
            <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td>
                  <p><a href="../get_involved.html"><img src="../images/bug_involved.gif" width="140" height="55" border="0"></a><br>
                    <font face="Arial, Helvetica, sans-serif" size="3"><br>
                    <a href="../get_involved.html">Click here</a> to learn how
                    you can improve transportation.</font> </p>
                  <hr>
                  <p><a href="../should_know.html"><img src="../images/bug_know.gif" width="140" height="55" border="0"></a><br>
                    <font face="Arial, Helvetica, sans-serif" size="3"><br>
                    <a href="../should_know.html">Click here</a> to learn about
                    our roads crisis.</font></p>
                  <hr>
                  <p><a href="../traffic_economy.html"><img src="../images/bug_traffic.gif" width="140" height="55" border="0"></a></p>
                  <p><font face="Arial, Helvetica, sans-serif" size="3"><a href="../traffic_economy.html">Click
                    here</a> to find out how congestion and bad roads are hurting
                    the economy.</font></p>
                  <hr>
                  <p><a href="../survey.html"><img src="../images/bug_survey.gif" width="140" height="55" border="0"></a><br>
                    <font face="Arial, Helvetica, sans-serif" size="3"><br>
                    <a href="../survey.html">Click here</a> and help us learn
                    more about our visitors.</font></p>
                </td>
              </tr>
            </table>
            <p>&nbsp;</p>
            </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
Hi,

Got your corrected HTML and am trying it out in a few min.

Thanks!

Rowby
Hi,

Got your corrected HTML and am trying it out in a few min.

Thanks!

Rowby
Hi I think it's ALMOST working.

Getting a message that says cannot open thanks, even though the file is in that folder.

Ummm I added my email address to the form, as if I were a state official, and you can test it by going to

print "Content-type: text/html \n\n";
    open(HANDLE,"http://www.calcommuters.org/email_thankyou.html") || print "could not open thanks";

http://www.calcommuters.org/bay_area/formthing.html

A minor point is as a temporary "state official" I'm not receving the email.  If there is a problem with the sndmail would an error pop up letting me know upon submission?

Rowby
My previous comment came out a big garbled.  So I'll restate it and clarify it.

1)  I don't think it is sending out the emails.
2)  It can't find the thank you page, which seems a minor problem.

I assume the email is supposed to be successfully sent before it calls the thank you page.  So I think even though it's having trouble finding the thank you page, it should have sent out the checked email -- but it isn't. At least it's not sending it to the test email checkbox called ROWBY on the form located at:

http://www.calcommuters.org/bay_area/formthing.html

So I think the form is not sending out the emails. At least I am not receiving my email.

In regards to the thank you not being found, here is a snippet from the code.  Why it's not finding the page baffles me, because it is indeed located at the link.  But I'll keep looking at that link to figure out why it's not being found.....

print "Content-type: text/html \n\n";
   open(HANDLE,"http://www.calcommuters.org/email_thankyou.html") || print "could not open thanks";

I think one more item is missing from the script.  

In addition to the emails -- it needs to store the information on a text database on the server.

So to help take care of that I've created a folder called store-emails inside the cgi-bin

In case the text files are better located NOT in the cgi-bin, I also created another folder called
store-emails at the foot of the site.

Thanks Rowby

====== old comment ===
Let me get this correctly. You want a Perl/CGI script that will mail one/many/all (depending on the
form selection) and also store the information a text database on the server.....
make that "root" of the site -- not "foot" -- I'm not *that* ignorant!


ok, here i am.... tell me where are you facing the problems
also, i did not understand the last statement
corrections to the html page

<input type="checkbox" name="checkbox110" value="rowby@rowby.com">

please notice the names of the checkboxes, they start at checkbox0 and go upto checkbox23, if you want to insert yourself it should be

<input type="checkbox" name="checkbox24" value="rowby@rowby.com">

looking further for more problems....
ASKER CERTIFIED SOLUTION
Avatar of rag2000
rag2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well everything is (or will, when I get the proper paths) is working.

I received the test email, thank you!

So I assume the reason the thank you page is not working is because I don't have the correct path, as well as the logs.  I see the log in the script so I assume it will work when I get the paths set up.

Thank you,

I will award the points tonight or saturday latest.  I have to hurry to client.

I am also increasing your points to a total of 300.

One final thing, is there a way to eliminate the <24  <25 in the script -- so I can use it for different forms. I can live with it, but it would be nice if I didn't have to go in there and change the numbers or make multiple renamed copies of the script.
i assume you have called the txt file as textDb.txt as in the script or name it whatever you want and assign it 666 rights, 'writable' file, a file that can be written to
Yes
(listening..)
are you paths setup? let me know, if there are any other problems? where is your site?
Hi,

The hosting company (believe it or not) won't be able to give me until maybe monday.  

But it all looks fine, so I am awarding you the 300 points now.  THanks for all your help.

ROwby
thanks, but I'd rather be around to help to get this done
ok   one thing that would be nice would be if there was a way to eliminate the the <24  <25 in the script -- so I can use it for different forms, and could add and remove emails easier.

If not I can live with it as is, and it is certainly excellent as is!  

Rowby
Hi,

Thank you!

The script now works fine with the corrected paths.  Here is the "live" page:

http://www.calcommuters.org/bay_area/email.html

The only "slight" modification of the perl script I would like changed if possible is this one:

  for($e=1;$e<25;$e++){

This script will be used for about 4 forms on the site, and each one has a different number of email recipients. Some might have 22 recipients, some might have 40.  

Of cousre I could simply create 4 different multipleRecipients.cgi scripts with a unique name (i.e. multipleRecipients-1.cgi, multipleRecipients-2.cgi) but the additional problem is these are elected officials in the state of California and the list will be continually modified as new officials are added and others are removed, etc etc.

So it would be easier if all I had to do was change the HTML page without having to always having to also go into the cgi-script and modify the  "for($e=1;$e<25;$e++){"

Can the script be set up so that could be an unlimited number of email recipients?  No minimum and no maximum.

Thanks

Rowby
Question.

I need to have further modifications done to the script.

And I will be happy to set it up as a new question with additional points.  Just tell me how much points this one is worth:

1) In addition to the other data collected in the database, I need add WHICH email recipients were checked off.  That is, if a checkmark was placed next to Gov. Davis, and Lt. Gov. Smith I need that included in the comma deliminated database.

2)  I also need the date the form was subitted added to the database in the following (or similar) format 01/01/02

----
On another note, someone commented that because the emails are embedded in the HTML that a hacker could take advantage of that and send a bunch of bogus emails by modifying the HTML page. Is there something in the script that could limit the URLS that the form can be sent from.  That would be the easiest for me. The alternative would be to have the actual email addresses in a hidden text file, I assume in the cgi-bin.  That would be more cumbersome for me and the client, but that is something to discuss.

Again, all of this this should probably be set up as a new question. So let me know what is the best way to procede.

Thanks,

Rowby
sorry, got busy, i see you have already posted a new question... somehow, I never got any emails from EE stating that comments were added to this question :(
No problem. You were probably not notified since this question is "closed".  

I think it's good anyway to restate the question with the new criteria -- and to add the additonal points at the new location (which you already found):

https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=cgi&qid=20137880

Thanks

Rowby