mu4e-draft: always save before sending

This ensures fields (like Date:) are updated.
This commit is contained in:
Dirk-Jan C. Binnema
2024-09-25 00:04:21 +03:00
parent 23b39759e0
commit 413c03ea1c

View File

@ -465,6 +465,10 @@ appropriate flag at the message forwarded or replied-to."
(message-remove-header "References"))) (message-remove-header "References")))
(when use-hard-newlines (when use-hard-newlines
(mu4e--send-harden-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 ;; now handle what happens _after_ sending
(add-hook 'message-sent-hook #'mu4e--compose-message-sent nil t)) (add-hook 'message-sent-hook #'mu4e--compose-message-sent nil t))