Skip to content

Commit

Permalink
mu4e-draft: always save before sending
Browse files Browse the repository at this point in the history
This ensures fields (like Date:) are updated.
  • Loading branch information
djcb committed Sep 25, 2024
1 parent 23b3975 commit 413c03e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mu4e/mu4e-draft.el
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ appropriate flag at the message forwarded or replied-to."
(message-remove-header "References")))
(when use-hard-newlines
(mu4e--send-harden-newlines))
;; in any case, make sure to save the message; this will also trigger
;; before/after save hooks, which fixes up various fields.
(set-buffer-modified-p t)
(save-buffer)
;; now handle what happens _after_ sending
(add-hook 'message-sent-hook #'mu4e--compose-message-sent nil t))

Expand Down

0 comments on commit 413c03e

Please sign in to comment.