The original code was intended to work, but clearly wasn't tested. Use
mail-header (as in existing code) to extract a header from a header alist.
This fixes the duplicate-from-line bug that is exercised by the test
just added to the test suite.
(when (not (string= "" user-agent))
(push (cons "User-Agent" user-agent) other-headers))))
- (unless (assoc "From" other-headers)
+ (unless (mail-header 'from other-headers)
(push (cons "From" (concat
(notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))