$Logid is not an authorized user of this script.


return to main page
"; exit; } $title=" - Member Email List"; require_once("inc_prof_variables.php"); include("head_v2.html"); /* includes head
and top line (same as page title). */ $today = date('Y-m'); if (!isset($ByYear)) $ByYear = date('Y'); $testDate = date('Y-m-d', strtotime('-45 days')); // for expiration test of Aug 15 ?>

Members Only: Email Address Listing
Listed Email Addresses
Unlisted Email Addresses
All Email Addresses
Current Members Only
Expired Members Only
Expired and Current Members
Expired By Year"   " size="4" maxlength="4">
Sort by Last Name
Sort by Expire Date
Sort by Member #
   (An email link will be generated at the bottom of the page.)

Search Text was [$txtSearch]

";} $exdate= "'".date('Y-m-d', strtotime('-30 Day'))."'"; if ($trace) {echo "Filter = [$filter]
";} $query="Select * from $tablename where MemberType not like \"%Silent%\" " ; // $query= 'select userid, fname, lname, email, sp_email, homephone, expiredate from ' . $tablename; // $query= 'select userid, fname, lname, concat("<",email,">") as email, homephone, expiredate from '. $tablename; if(isset($trace)) echo "
Query is [$query]
"; if ($listed<>'both') { if ($trace) {echo "

listed = [$listed]

";} if ($listed=="listed"){$where1 = 'not emaillisted = "n"';} else {$where1 = "emaillisted = 'n'";} } if ($expired<>'both') { if ($expired=="current") {$where2 = "expiredate >= \"$testDate\"";} if ($expired=="expired") {$where2 = "expiredate < \"$testDate\"";} if ($expired=="ByYear") {$where2 = "expiredate like \"%$ByYear%\"";} } // like '%".$txtSearch."%' If (($where1) and ($where2)) { $query.= " and (($where1) and ($where2))"; }else { if (($where1) or ($where2) ) { $query.= " and $where1"; $query.= " $where2"; } } $query.= " order by $order"; //$trace="on"; if ($trace) { echo "Will search for [$listed] email addresses"; echo "
Query will be
$query
"; } //open_db(); require_once'inc_profile_read.php'; if ($match_results<1 ) { echo "No members match the specified criteria.

"; } else { echo"Number of matching records=[$match_results]"; if ($trace){echo "


First match_[$row[fname] $row[lname] $row[userid] $row[email] $row[SP_Email] $row[homephone] ]


";} unset($trace); $fileName="EmailList.csv"; if (isset($trace)) {echo "Opening $fileName
";} $outfile = fopen("tmp/$fileName","wb") or die("Unable to open output file [$fileName]"); ?>

"); // if (strlen($Email) > 1) { $cclist.=";\"$Email\""; } // if (strlen($Email) > 1) { $cclist.=";$Email"; } // if ($i==146){$Email="Test@k4hm.net";} // if ($i==164){$Email="Test@k4hm.net";} // if ($i == 188) alert("I=$i Userid=$Userid and Email=[$Email]"); // if ($i<>146){$cclist.=";$Email";} else {alert("Userid=[$Userid] Email=[$Email]");} // if ($Userid == "W3IGW") {$Email="test@k4hm.net";} if (strlen($Email) > 7) { $cclist.=$Email.","; fwrite($outfile, "$Email, $FName, $Userid,$ExpireDate\r\n"); if (isset($trace)) echo "[$Email]
"; } $row=mysqli_fetch_array($query_results); } fclose($outfile); echo "
Mem# Name Userid
CallSign
Email Sp Email Phone Expires
$MemberNumber $FullName $Userid $Email $SPEmail $Homephone $ExpireDate
\n"; $query="select max(ChangedDate) FROM $tablename"; $query_results=mysqli_query($link, $query); //echo "query results= [ $query_results ]
"; $match_results=mysqli_num_rows($query_results); //echo "match results= [ $match_results ]
"; $row=mysqli_fetch_array($query_results); echo "Database last update time: $row[0] Pacific Time
"; ?> Generate an email to this list.      Download the Email list
Note 1:
The email you generate will protect the email addresses by putting them in the BCC field. Howerver, your email client may require that you provide at least one To: address. I suggest you put your own email address in the To: field.

Note 2:
Your email client or server may not allow sending to a long list of recipients. If you are using Outlook, or Outlook Express, you can download the entire profile listing from the "Profile Editor" and inport it to Excel. From Excel you can copy multiple entries from the email column (50 at a time seems to work) into the BCC field into each email. For example you could send to all 190 current members using only 4 emails. This may also work in other email clients but I have not tested it. Please let me know if this does not work for your email client.

Thanks,
K4HM - Hank


"; //echo("bcclist = [$cclist]"); } } ?>