]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-mua.el
emacs: Explicitly set the From address when composing a new message.
[notmuch] / emacs / notmuch-mua.el
index 0ad079ffaea88a38a2a1cc9ed594341ec3bc0265..ddaec676f4232b614920c7c0d66d88cb42d6b7d2 100644 (file)
@@ -126,6 +126,10 @@ list."
       (when (not (string= "" user-agent))
        (push (cons "User-Agent" user-agent) other-headers))))
 
+  (unless (assoc "From" other-headers)
+    (push (cons "From" (concat
+                       (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))
+
   (message-mail to subject other-headers continue
                switch-function yank-action send-actions)
   (message-sort-headers)