summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mumi/messages.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/mumi/messages.scm b/mumi/messages.scm
index a743893..ae39b9a 100644
--- a/mumi/messages.scm
+++ b/mumi/messages.scm
@@ -85,9 +85,10 @@ yet. Return new results alongside cached results."
(assoc-ref (or (email-headers message) '()) key))
(define (sender message)
- (or (and=> (header message 'from) first)
- '((name . "Unknown sender")
- (address . "unknown"))))
+ (let ((from (header message 'from)))
+ (or (false-if-exception (and=> from first))
+ `((name . ,(or from "Unknown sender"))
+ (address . "unknown")))))
(define sender-email
(compose extract-email sender))