Commit graph

19 commits

Author SHA1 Message Date
Bradley M. Kuhn
65070094ed Do not attempt to intuit renewal response here.
This code worked reasonable well when there was only one type of renewal
notice in play for a long period of time, but the point here is that we
can have many of them and this script should handle sending out the
different ones at different types.

We probably need an entirely separate script to intuit response.
2016-12-02 14:37:38 -08:00
Bradley M. Kuhn
fb9c43d119 Count supporters rather than use all ids returned.
We actually can't rely on a call to $sp->findDonor({}) to give us *just*
Supporters, as eventually, this may be a donor database too.  So, count
them.

Really, $sp->findDonor() should be able to take { isSupporter => 1 }
instead.
2016-12-02 13:07:59 -08:00
Bradley M. Kuhn
522df6bbfa add display_name to outgoing email.
In an effort to improve the formatting on outgoing emails from the
renewal script, add the display_name to the To: field.

I'm not completely happy with what the MIME encoding is doing here.
Specifically, it chops the line on the < of <email@example.org> so you
get this:

"A very long name that leads to wrapping of the MIME encoded line" <
 email@example.org>

As I read https://www.ietf.org/rfc/rfc2822.txt, it violates this SHOULD:

  Note: Though structured field bodies are defined in such a way that
    folding can take place between many of the lexical tokens (and even
    within some of the lexical tokens), folding SHOULD be limited to
    placing the CRLF at higher-level syntactic breaks.  For instance, if
    a field body is defined as comma-separated values, it is recommended
    that folding occur after the comma separating the structured items
    in preference to other places where the field could be folded, even
    if it is allowed elsewhere.

Brett and I decided to leave it for now and go with it.
2016-12-02 12:56:53 -08:00
Bradley M. Kuhn
0b05ac3c5c CLI parameter for "how far out" to send renewal
This CLI parameter allows flexibility on how far in advance to send
renewal notices.
2016-12-02 12:55:52 -08:00
Bradley M. Kuhn
8bf9a01550 Also count lapsed/active against monthly/annual.
Add some details about the amount who are monthly/annual to the counts.
2016-11-05 10:34:41 -07:00
Bradley M. Kuhn
dc5f959259 Additional staff report for renewal notice report. 2016-10-20 11:16:51 -07:00
Bradley M. Kuhn
413f63ea43 Renewal count by month. 2016-09-07 16:05:06 -07:00
Bradley M. Kuhn
7f2cdba149 reverse sort for already lapsed; add multi-year
Multiyear totals are now included in report.

already lapsed list is reverse sorted by date instead.
2016-07-20 16:09:32 -07:00
Bradley M. Kuhn
9a82f72aa9 Spacing changes. 2016-03-11 11:04:46 -08:00
Bradley M. Kuhn
279c3e33f9 Add lapsed count to output for status report. 2016-03-07 10:36:28 -08:00
Bradley M. Kuhn
6137907548 Rework to create status report for staff.
This script now also sends an email to the staff (via the $FROM_ADDRESS)
about the status of Supporter renewals.
2016-03-07 10:29:18 -08:00
Bradley M. Kuhn
a0c5936e1c Send renewal notices one week before expiration. 2016-03-07 08:25:46 -08:00
Bradley M. Kuhn
ae0b7000ae Add verbose argument. 2016-01-22 17:12:22 -08:00
Bradley M. Kuhn
376075e549 Skip lapsed supporters. 2016-01-22 17:12:05 -08:00
Bradley M. Kuhn
da75edccf2 Handle other donor info. 2016-01-03 13:17:00 -08:00
Bradley M. Kuhn
6d7bae7e02 Correct printout of email addresses for renewal. 2016-01-03 12:26:49 -08:00
Bradley M. Kuhn
dcbc823f0b need $emailTo variable. 2015-12-31 02:24:32 -08:00
Bradley M. Kuhn
5e226a3483 Rename variable. 2015-12-31 02:24:26 -08:00
Bradley M. Kuhn
db43a3ed71 First draft of renewal-notices script. 2015-12-31 02:16:30 -08:00