Add support for email headers.

This commit is contained in:
Dominik Pantůček 2023-09-19 20:42:49 +02:00
parent a8d27165cc
commit ee696c3338
2 changed files with 14 additions and 3 deletions

View file

@ -60,6 +60,8 @@
(print "### From: " (ldict-ref em 'from (*email-from*)))
(print "### To: " (ldict-ref em 'to))
(print "### Subject: " (ldict-ref em 'subject))
(when (*notifications-cc*)
(print "### CC: " (*notifications-cc*)))
(let loop ((lines (ldict-ref em 'body)))
(when (not (null? lines))
(print (car lines))
@ -75,6 +77,7 @@
""))
(send-mail (ldict-ref em 'body)
#:from (*email-from*)
#:headers (ldict-ref em 'headers '())
#:to (ldict-ref em 'to)
#:subject (ldict-ref em 'subject)))