78 | | The script html/ops/mass_email_script.php is for sending email newsletters. The script categorize participants as follows: |
79 | | |
80 | | * ''Failed'': zero total credit. These people failed to download and install the client software, or failed to get it working (e.g. because of proxy problems) or uninstalled it before finishing any work. |
81 | | * ''Lapsed'': nonzero total credit but recent average credit < 1: These people did work in the past, but none recently. |
82 | | * ''Current'': recent average credit >= 1. These are your active participants. |
| 78 | The script html/ops/mass_email_script.php is for sending email newsletters. |
| 79 | Run it from the command line. |
| 80 | The optional arguments are: |
| 81 | --userid N:: send only to the user with the given ID |
| 82 | --send:: actually send the email (this is an option to reduce the chance of accidents). |
| 83 | --show_email:: show what would be sent rather than sending it |
| 84 | --explain:: print a line describing each email |
| 85 | --idfile name:: read user IDs from the given file (one per line, increasing order). |
| 86 | --nocurrent:: don't sent emails to "current" users. |
| 87 | --batch N:: limits size of database query. |
| 88 | |
| 89 | The script categorizes participants as follows: |
| 90 | |
| 91 | * ''Failed'': zero total credit. These people failed to download and install the client software, or failed to get it working (e.g. because of proxy problems) or uninstalled it before finishing any work. Email to them should include a link to the BOINC help page (http://boinc.berkeley.edu/help.php) or other help resources. |
| 92 | * ''Lapsed'': nonzero credit, but their computers have not contacted your server in > 60 days. |
| 93 | * ''Current'': These are your active participants. |
98 | | on <create_time/> but that your computer |
99 | | hasn't completed any work. |
100 | | Possibly you encountered problems |
101 | | installing or using the software. |
102 | | Many of these problems have now been fixed, |
103 | | and we encourage you to visit |
104 | | <a href=http://a.b.c>our web site</a>, |
105 | | download the latest version of the software, and try again. |
| 108 | on <create_time/> but that your computer hasn't completed any work. |
| 109 | If you had problems installing or using the software, |
| 110 | you can get help from <a href=http://boinc.berkeley.edu/help.php>online volunteers</a>. |
| 111 | Please try again! |
125 | | on <create_time/> but that your computer |
126 | | hasn't completed any work. |
127 | | Quite possibly you encountered problems |
128 | | installing or using the software. |
129 | | Many of these problems have now been fixed, |
130 | | and we encourage you to visit |
131 | | <a href=http://a.b.c>our web site</a>, |
132 | | download the latest version of the software, and try again. |
| 130 | on <create_time/> but that your computer hasn't completed any work. |
| 131 | If you had problems installing or using the software, |
| 132 | go here to get help from online volunteers: |
| 133 | http://boinc.berkeley.edu/help.php |
| 134 | Please try again! |
147 | | Test your email before sending it out to the world. As distributed, mass_email_script.php has the following variables defined near the top: |
148 | | {{{ |
149 | | $testing = true; |
150 | | }}} |
151 | | Set it to false to actually send emails (rather than just print to stdout). |
152 | | {{{ |
153 | | $userid = 1; |
154 | | }}} |
155 | | If this is nonzero, email will be sent to the given user ID; Otherwise it will be sent to all users. |
156 | | |
157 | | To start, set $userid to the ID of your own user record. Run the script by typing |
158 | | {{{ |
159 | | php mass_email_script.php |
| 149 | It's important to send the right email to the right people, |
| 150 | and to do it only once. |
| 151 | We recommend testing as follows. |
| 152 | First send to yourself (say, user ID 5). |
| 153 | {{{ |
| 154 | mass_email_script.php --userid 5 --show_email |
163 | | Then set $testing = false and run the script again. You'll get three emails; check them. |
164 | | |
165 | | Then set $testing = false and $userid = 0, create an empty file called mass_email/log (see below), and run the script. You'll get voluminous output to stdout, but no emails will be sent. Control-C it quickly if you want. Make sure that each user is being sent the right type of email. |
166 | | |
167 | | When you're sure that everything is correct, set $testing = false, set mass_email/log to empty, and run the script. It will now send mass emails. Depending on the size of your user table, it may take hours or days to complete. You can control-C it and restart whenever you want; it automatically picks up where it left off (see below). |
168 | | Checkpoint/restart |
169 | | |
170 | | mass_email_script.php manages checkpoint/restart when dealing with large numbers of participants. Mails are sent in order of increasing user ID. The file mass_email/log has a list of IDs that have been processed. On startup, the script reads this file, finds the last entry, and starts from there. |
| 158 | Then run |
| 159 | {{{ |
| 160 | mass_email_script.php --userid 5 --send |
| 161 | }}} |
| 162 | You'll get three emails; check them. |
| 163 | |
| 164 | Now type |
| 165 | {{{ |
| 166 | touch email_log |
| 167 | mass_email_script.php --explain | more |
| 168 | }}} |
| 169 | You'll get a list of what type of email will be sent to each user. |
| 170 | Make sure that each user is being sent the right type of email. |
| 171 | |
| 172 | When you're sure that everything is correct, type |
| 173 | {{{ |
| 174 | truncate email_log |
| 175 | mass_email_script.php --send |
| 176 | }}} |
| 177 | It will now send mass emails. Depending on the size of your user table, it may take hours or days to complete. You can control-C it and restart whenever you want; it automatically picks up where it left off (see below). |
| 178 | |
| 179 | === Checkpoint/restart === |
| 180 | |
| 181 | mass_email_script.php manages checkpoint/restart when dealing with large numbers of participants. Mails are sent in order of increasing user ID. The file email_log has a list of IDs that have been processed. On startup, the script reads this file, finds the last entry, and starts from there. |
179 | | The script html/ops/remind.php is for sending reminder emails. The script categorizes users as follows. |
| 190 | The script html/ops/remind.php is for sending reminder emails. |
| 191 | Run it on the command line. Options are: |
| 192 | |
| 193 | --lapsed:: send emails to lapsed users |
| 194 | --failed:: send emails to failed users |
| 195 | --userid N:: send both lapsed and failed emails to the user with the given ID |
| 196 | --send:: actually send the email (this is an option to reduce the chance of accidents). |
| 197 | --show_email:: show what would be sent rather than sending it |
| 198 | --explain:: print a line describing each email |
| 199 | |
| 200 | The script categorizes users as follows. |