Skip to content

Commit

Permalink
Preserve the buffer-local value of user-mail-address
Browse files Browse the repository at this point in the history
When message-make-fqdn is called as part of constructing a message ID,
the value of user-mail-address is likely to be used to provide the
domain portion of the ID.  Restore the killed value of
user-mail-address after org-msg-edit-mode is activated, to ensure that
message IDs show a domain that matches the sender.
  • Loading branch information
Morgan Willcock authored and jeremy-compostella committed Mar 19, 2024
1 parent 0b65f0f commit 67886c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion org-msg.el
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,12 @@ MML tags."
(if (org-msg-message-fetch-field "to")
(org-msg-goto-body)
(message-goto-to))
(org-msg-edit-mode))
;; Preserve the buffer-local value of user-mail-address to
;; ensure that message IDs generated from it will be using a
;; domain name that matches the sender.
(let ((address user-mail-address))
(org-msg-edit-mode)
(setq-local user-mail-address address)))
(set-buffer-modified-p nil)))))

(defun org-msg-post-setup--if-not-reply (&rest args)
Expand Down

0 comments on commit 67886c9

Please sign in to comment.