) { $attending = 1; }
                if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; }
                if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; }
+               $email = $membership_data{$index}{'Individual E-mail'};
+               if ($email eq "") { $email = $membership_data{$index}{'Household E-mail'}; }
                $sth = $dbh->prepare("select * from eq_elder where name='$elder_name'");
                $sth->execute or die "-E- DB error: $DBI::errstr\n";
                my @data = ();
                if($rows == 0) {
                    # No existing records found for this elder, make a new entry
                    print "   Adding new Elder: $elder_name\n";
-                   $sth = $dbh->prepare("insert into eq_elder values (NULL,'$id','$elder_name','$phone','','1','','1','',$attending,1)");
+                   $sth = $dbh->prepare("insert into eq_elder values (NULL,'$id','$elder_name','$phone','$email','1','','1','',$attending,1)");
                    $sth->execute or die "-E- DB error: $DBI::errstr\n";
                } elsif($rows == 1) {
                    # An existing record was found for this elder, update it
                    $sth->execute or die "-E- DB error: $DBI::errstr\n";
                    $sth = $dbh->prepare("update eq_elder set indiv_id='$id' where name='$elder_name'");
                    $sth->execute or die "-E- DB error: $DBI::errstr\n";
+                   $sth = $dbh->prepare("update eq_elder set email='$email' where name='$elder_name'");
+                   $sth->execute or die "-E- DB error: $DBI::errstr\n";
                } else {
                    # More than one record was found. Error! This shouldn't happen.
                    print "   -E- More than one record found ($rows) for Elder: $elder_name\n";
 
 ###################################################
 # Parse Ward Data Files
+#&optional_csv_to_hash("$datadir/EQ\ Prospective\ Elders.csv", \%prospective_elder_data);
 &csv_to_hash("$datadir/Membership.csv",\%membership_data);
 &csv_to_hash("$datadir/HomeTeaching.csv",\%hometeaching_data);
 &csv_to_hash("$datadir/Organization.csv",\%organization_data);
 
      Full Name
      Priesthood
      HH Position
+     Household E-mail
+     Individual E-mail
     
    Hometeaching.csv:
      Home Teacher 1
      Org Seq
      Sustained
    
+   EQ Prospective Elders.csv  
+      (optional file that lists the prospective elders for which  the EQ has stewardship.
+      Use this file if you want them listed in the PPI list
+      import mls/EQ\ Prospective\ Elders.mls as a new report into MLS to create the csv file.)
+
    Home Teacher per Companionship.csv  (optional file that lists home teaching stats - use all fields)
      import mls/Home\ Teacher\ per\ Companionship.mls as a new report into MLS to create the csv file.
+
 
          $dtstart = gmdate("Ymd"."\T"."His"."\Z", mktime($hour,$minute,$seconds,$month,$day,$year));
          $dtstartstr = date("l, F d, o g:i A", mktime($hour,$minute,$seconds,$month,$day,$year));
          
-         // Set the email address of the person making the appointment
-         $from = $GLOBALS['phpgw_info']['user']['fullname'] . "<" .
-                 $GLOBALS['phpgw_info']['user']['preferences']['email']['address'] . ">";
-         
          $sql = "SELECT * FROM eq_presidency where presidency='$presidency'";
          $this->db2->query($sql,__LINE__,__FILE__);
          if($this->db2->next_record()) {
            $interviewer = $this->db2->f('name');
          }
 
+         // Set the email address of the interviewer
+         $from = $email;
+
          if($elder > 0) { 
            $sql = "SELECT * FROM eq_elder where elder='$elder'";
            $this->db2->query($sql,__LINE__,__FILE__);
 
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<customReport name="EQ Prospective Elders" description="" isPortrait="false" groupOption="NONE" splitGroups="false">
+  <query string="2,7,18,true,-1" />
+  <query string="1,0,1,true,-1" />
+  <query string="15,0,3,true,-1" />
+  <query string="11,1,1,true,-1" />
+  <column typeID="27" width="50" />
+  <column typeID="31" width="50" />
+</customReport>
+
+
 
                        if options.verbose: print lineToWrite
                        tf.write(lineToWrite + "\n")
                        #if options.verbose: print line
+               tf.flush()
                zipfile.write(tf.name, xmlNode.getAttribute("Name"))
                tf.close()
                
 
       <MLSField>Full Name</MLSField>\r
       <MLSField>Priesthood</MLSField>\r
       <MLSField>HH Position</MLSField>\r
+      <MLSField>Household E-mail</MLSField>\r
+      <MLSField>Individual E-mail</MLSField>\r
     </MLSFile>\r
 \r
     <MLSFile Name="HomeTeaching.csv">\r
       <Extension>csv</Extension>\r
       <MLSField>*</MLSField>\r
     </MLSFile>\r
+\r
+    <MLSFile Name="EQ Prospective Elders.csv">\r
+      <Description>A list of prospective elders in the EQ stewardship</Description>\r
+      <Extension>csv</Extension>\r
+      <MLSField>*</MLSField>\r
+    </MLSFile>\r
   </CSVFiles>\r
 </ThirdCouncelorMLSFiles>\r