From 3889c93c30e60c1184945616d7ce57ca7680626d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Wed, 19 Apr 2023 20:01:43 +0200 Subject: [PATCH] Log sending emails. --- src/notifications.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/notifications.scm b/src/notifications.scm index ec43fdd..31c9884 100644 --- a/src/notifications.scm +++ b/src/notifications.scm @@ -51,7 +51,8 @@ mbase members-print table - bank-account) + bank-account + logging) ;; Prints email to the console (define (print-notification-email em) @@ -65,7 +66,12 @@ ;; Sends notification email - the dictionary representation (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) #:from (*email-from*) #:to (ldict-ref em 'to)