Make from email address configurable on command-line.
This commit is contained in:
parent
b1226fd12c
commit
8e188a0a8c
2 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,8 @@
|
||||||
(-quiet () "Suppress all output"
|
(-quiet () "Suppress all output"
|
||||||
(-quiet- #t)
|
(-quiet- #t)
|
||||||
(*progress-quiet* #t))
|
(*progress-quiet* #t))
|
||||||
|
(-from (email) "Sender email address"
|
||||||
|
(*reminder-from* email))
|
||||||
""
|
""
|
||||||
"Query options:"
|
"Query options:"
|
||||||
(-mi (id) "Specify member by id" (-member-id- (string->number id)))
|
(-mi (id) "Specify member by id" (-member-id- (string->number id)))
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
(module
|
(module
|
||||||
reminders
|
reminders
|
||||||
(
|
(
|
||||||
|
*reminder-from*
|
||||||
make+print-reminder-email
|
make+print-reminder-email
|
||||||
make+send-reminder-email
|
make+send-reminder-email
|
||||||
)
|
)
|
||||||
|
@ -42,6 +43,9 @@
|
||||||
util-format
|
util-format
|
||||||
brmember-format)
|
brmember-format)
|
||||||
|
|
||||||
|
;; From address
|
||||||
|
(define *reminder-from* (make-parameter "Brmlab - Rada <rada@brmlab.cz>"))
|
||||||
|
|
||||||
;; Creates reminder email body
|
;; Creates reminder email body
|
||||||
(define (reminder-email-body mr)
|
(define (reminder-email-body mr)
|
||||||
(let ((C identity)
|
(let ((C identity)
|
||||||
|
@ -97,6 +101,7 @@
|
||||||
(let ((em (make-reminder-email mr)))
|
(let ((em (make-reminder-email mr)))
|
||||||
(print "Sending " (ldict-ref em 'subject) " originally to " (ldict-ref em 'to))
|
(print "Sending " (ldict-ref em 'subject) " originally to " (ldict-ref em 'to))
|
||||||
(send-mail (ldict-ref em 'body)
|
(send-mail (ldict-ref em 'body)
|
||||||
|
#:from (*reminder-from*)
|
||||||
#:to "joe@joe.cz"
|
#:to "joe@joe.cz"
|
||||||
#:subject (ldict-ref em 'subject))))
|
#:subject (ldict-ref em 'subject))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue