Julian
Julian

Reputation: 1732

mu4e with msmtp does not store mail sent directory after sending mails

for sending E-mails with my Emacs, I have setup mu4e with msmtp. The corresponding configuration is pasted down below. I am managing my E-mail accounts through mu4e contexts. All my E-mails are stored under ~/Maildir; the E-mails for my yahoo account are stored under ~/Maildir/yahoo/. Sending mails works like a charm but unfortunately, once they have been sent, they are not stored under ~/Maildir/yahoo/Sent which should be the default behaviour, I suppose. If I understood the mu4e documentation right, the variable mu4e-sent-messages-behavior is per default set to sent, so that sent messages should be automatically saved under the configured mu4e-sent-folder.

I was wondering if I am missing something in my configuration.

Thank you very much for your help.

(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq message-sendmail-extra-arguments '("--read-envelope-from"))
(setq message-sendmail-f-is-evil 't)
(setq sendmail-program "msmtp")
(setq mu4e-compose-context-policy 'ask-if-none
      mu4e-context-policy 'pick-first
      mu4e-maildir "~/Maildir"
      mu4e-contexts
      `(,(make-mu4e-context
            :name "yahoo"
            :enter-func (lambda () (mu4e-message "Switch to Yahoo"))
            :match-func (lambda (msg)
                          (when msg
                            (string-prefix-p "/yahoo" (mu4e-message-field msg :maildir))))
          :vars '((user-mail-address . "[email protected]")
                  (mu4e-refile-folder . "/yahoo/Draft")
                  (mu4e-sent-folder . "/yahoo/Sent")
                  (mu4e-trash-folder . "/yahoo/Trash")
                  (mu4e-drafts-folder . "/yahoo/Drafts")))))

Upvotes: 1

Views: 1325

Answers (1)

manandearth
manandearth

Reputation: 824

I had that problem. You need to require smtp in your .emacs:

(require 'mu4e)
(require 'smtpmail)

look at here

Upvotes: 1

Related Questions