summaryrefslogtreecommitdiff
path: root/scripts/send_thawte.php.txt
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/send_thawte.php.txt')
-rw-r--r--scripts/send_thawte.php.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/send_thawte.php.txt b/scripts/send_thawte.php.txt
index f02b73c..d3a9e77 100644
--- a/scripts/send_thawte.php.txt
+++ b/scripts/send_thawte.php.txt
@@ -112,18 +112,19 @@
$lastid = trim(fgets($fp, 4096));
fclose($fp);
}
-
- $subject = "Change in points calculation";
echo "ID now: $lastid\n";
+
+ $count = 0;
+
$query = "select `id`,`fname`,`lname`,`email`,`language` from `users` where `deleted` = 0 and `id` > '$lastid' order by `id`";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
- $mailtxt = "Hello ".$row["fname"]." ".$row["lname"]."\n".$lines_EN."\n\n";
+ $mailtxt = "Hello ${row["fname"]} ${row["lname"]},\n".$lines_EN."\n\n";
switch ($row["language"])
{
case "de_DE":
@@ -152,13 +153,14 @@
break;
}
- sendmail($row['email'], "[CAcert.org] $subject", $mailtxt, "mailing@cacert.org", "", "", "CAcert", "returns@cacert.org", "");
+ sendmail($row['email'], "[CAcert.org] Changes at CAcert", $mailtxt, "mailing@cacert.org", "", "", "CAcert", "returns@cacert.org", "");
$fp = fopen("send_thawte_lastid.txt", "w");
fputs($fp, $row["id"]."\n");
fclose($fp);
- echo "Sent mail to: ".$row["id"]."\n";
+ $count++;
+ echo "Sent ${count}th mail. User ID: ${row["id"]}\n";
sleep (1);
}