Make daily-digest work for more users than just me account-recovery
authorChip Black <bytex64@bytex64.net>
Thu, 5 Mar 2015 03:53:23 +0000 (21:53 -0600)
committerChip Black <bytex64@bytex64.net>
Thu, 5 Mar 2015 03:53:23 +0000 (21:53 -0600)
aux/bin/daily-digest

index 18ae52b..64f0a99 100755 (executable)
@@ -67,4 +67,9 @@ EMAIL
     )->send;
 }
 
-send_email('bytex64');
+# TODO: Be smarter about this.  Maybe maintain a list of users with email addresses?
+opendir USERS, Blerg::Database::configuration->{data_path};
+while (my $user = readdir USERS) {
+    next if $user =~ /^\./;
+    send_email($user);
+}