diff options
author | Michael Tänzer <neo@nhng.de> | 2011-11-23 22:25:49 +0100 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2011-11-23 22:25:49 +0100 |
commit | 4b1ab7a70823eb5ed168e566b9c7fc10eab6a88a (patch) | |
tree | d8c43b4124f667aef6af855ffde35811892bb997 /scripts/send_thawte.php.txt | |
parent | 576aa2683f685ae9f61d46df6ee8572fe8b4d477 (diff) | |
download | cacert-devel-4b1ab7a70823eb5ed168e566b9c7fc10eab6a88a.tar.gz cacert-devel-4b1ab7a70823eb5ed168e566b9c7fc10eab6a88a.tar.xz cacert-devel-4b1ab7a70823eb5ed168e566b9c7fc10eab6a88a.zip |
bug 827: Subject changed to the one in the wiki, count the mails sent so far
and add comma after "Hello X Y"
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'scripts/send_thawte.php.txt')
-rw-r--r-- | scripts/send_thawte.php.txt | 12 |
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); } |