Report ML check status in summary emails.
This commit is contained in:
parent
d24b7c4136
commit
6947dd37b3
4 changed files with 22 additions and 11 deletions
|
@ -40,6 +40,7 @@
|
|||
(chicken format)
|
||||
(chicken string)
|
||||
(chicken sort)
|
||||
(chicken port)
|
||||
brmember
|
||||
util-mail
|
||||
util-bst-ldict
|
||||
|
@ -54,7 +55,8 @@
|
|||
table
|
||||
bank-account
|
||||
logging
|
||||
srfi-1)
|
||||
srfi-1
|
||||
mailinglist)
|
||||
|
||||
;; Prints email to the console
|
||||
(define (print-notification-email em)
|
||||
|
@ -142,7 +144,7 @@
|
|||
(send-notification-email em)))
|
||||
|
||||
;; Summary email of membership fees payments
|
||||
(define (summary-email-body mb)
|
||||
(define (summary-email-body mb mls)
|
||||
(let* ((mbs (members-summary mb))
|
||||
(students (car mbs))
|
||||
(full (cdr mbs))
|
||||
|
@ -175,6 +177,12 @@
|
|||
(brmember-format "~N (~S)" mr))
|
||||
soonexps)
|
||||
",")))))
|
||||
(mlcheck-lst
|
||||
(string-split
|
||||
(with-output-to-string
|
||||
(lambda ()
|
||||
(print-mailing-list-checks mb mls)))
|
||||
"\n"))
|
||||
(debtors (sort
|
||||
(members-to-notify mb 1)
|
||||
brmember<?))
|
||||
|
@ -272,6 +280,7 @@
|
|||
(append income-lst
|
||||
unpaired-lst
|
||||
soonexps-lst
|
||||
mlcheck-lst
|
||||
debtors-lst
|
||||
boring-lst
|
||||
dw-lst
|
||||
|
@ -282,21 +291,21 @@
|
|||
))))
|
||||
|
||||
;; Creates the summary email structure
|
||||
(define (make-summary-email mb)
|
||||
(define (make-summary-email mb mls)
|
||||
(make-ldict
|
||||
`((to . ,(*summary-mailto*))
|
||||
(subject . ,(format "Členské příspěvky ~A"
|
||||
(today/iso)))
|
||||
(body . ,(summary-email-body mb)))))
|
||||
(body . ,(summary-email-body mb mls)))))
|
||||
|
||||
;; Just print to standard output
|
||||
(define (make+print-summary-email mb)
|
||||
(let ((em (make-summary-email mb)))
|
||||
(define (make+print-summary-email mb mls)
|
||||
(let ((em (make-summary-email mb mls)))
|
||||
(print-notification-email em)))
|
||||
|
||||
;; Actually send emails
|
||||
(define (make+send-summary-email mr)
|
||||
(let ((em (make-summary-email mr)))
|
||||
(define (make+send-summary-email mr mls)
|
||||
(let ((em (make-summary-email mr mls)))
|
||||
(send-notification-email em)))
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue