fix(mu4e): Configure msmtp to preserve email body content

The mu4e msmtp configuration was causing email bodies to be stripped,
especially for multipart messages from org-msg. This was due to missing
critical msmtp settings.

Changes:
- Add message-sendmail-f-is-evil to prevent -f flag issues
- Add --read-envelope-from to msmtp arguments
- Set both send-mail-function and message-send-mail-function

Fixes: nixos-configs-9l8
This commit is contained in:
2026-01-10 10:39:29 -08:00
parent ef4e4509d3
commit 05ad04764e

View File

@@ -211,11 +211,16 @@
mu4e-headers-time-format "%H:%M") mu4e-headers-time-format "%H:%M")
;; Sending mail via msmtp ;; Sending mail via msmtp
(setq message-send-mail-function 'message-send-mail-with-sendmail ;; NOTE: message-sendmail-f-is-evil and --read-envelope-from are required
sendmail-program (executable-find "msmtp") ;; to prevent msmtp from stripping the email body when processing headers.
message-sendmail-envelope-from 'header ;; Without these, multipart messages (especially from org-msg) may arrive
mail-envelope-from 'header ;; with empty bodies.
mail-specify-envelope-from t)) (setq sendmail-program (executable-find "msmtp")
send-mail-function #'message-send-mail-with-sendmail
message-send-mail-function #'message-send-mail-with-sendmail
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-sendmail-envelope-from 'header))
;; Whenever you reconfigure a package, make sure to wrap your config in an ;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g. ;; `after!' block, otherwise Doom's defaults may override your settings. E.g.