Log sending emails.

This commit is contained in:
Dominik Pantůček 2023-04-19 20:01:43 +02:00
parent 8f0d474d2b
commit 3889c93c30

View file

@ -51,7 +51,8 @@
mbase mbase
members-print members-print
table table
bank-account) bank-account
logging)
;; Prints email to the console ;; Prints email to the console
(define (print-notification-email em) (define (print-notification-email em)
@ -65,7 +66,12 @@
;; Sends notification email - the dictionary representation ;; Sends notification email - the dictionary representation
(define (send-notification-email em) (define (send-notification-email em)
(print "Sending " (ldict-ref em 'subject) " originally to " (ldict-ref em 'to)) (log-info "Sending ~A to ~A~A"
(ldict-ref em 'subject)
(ldict-ref em 'to)
(if (*mailto-override*)
(format " (overriden to ~A)" (*mailto-override*))
""))
(send-mail (ldict-ref em 'body) (send-mail (ldict-ref em 'body)
#:from (*email-from*) #:from (*email-from*)
#:to (ldict-ref em 'to) #:to (ldict-ref em 'to)