diff options
-rw-r--r-- | email/email.scm | 2 | ||||
-rw-r--r-- | tests/email.scm | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/email/email.scm b/email/email.scm index 8cb9757..fdd8031 100644 --- a/email/email.scm +++ b/email/email.scm @@ -873,6 +873,8 @@ list of header keys and values." (disposition . ,post-process-content-disposition) (subject . ,(match-lambda* (`(subject ,subject) `(subject ,(decode-mime-encoded-word subject))))) + (keywords . ,(lambda (_ value) + (cons 'keywords (string-split value #\,)))) (fields . ,(lambda (_ . fields) (add-default-headers (post-process-fields fields)))) (*text* . ,(lambda (_ value) value)) diff --git a/tests/email.scm b/tests/email.scm index c82f567..03c3b70 100644 --- a/tests/email.scm +++ b/tests/email.scm @@ -365,6 +365,17 @@ copyright =A9") (content-transfer-encoding . quoted-printable)) "copyright �")) +(test-alist= "keywords header must be a list" + (parse-email-headers + "Keywords: foo, bar +") + + `((keywords " foo" " bar") + (content-type (type . text) + (subtype . plain) + (charset . "utf-8")) + (content-transfer-encoding . 7bit))) + (test-equal "parse name-addr email address" (parse-email-address "Foo <foo@example.org>") '((name . "Foo") (address . "foo@example.org"))) |