1

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 . "address@yahoo.de")
                  (mu4e-refile-folder . "/yahoo/Draft")
                  (mu4e-sent-folder . "/yahoo/Sent")
                  (mu4e-trash-folder . "/yahoo/Trash")
                  (mu4e-drafts-folder . "/yahoo/Drafts")))))
AnFi
  • 10,493
  • 3
  • 23
  • 47
Julian
  • 1,694
  • 22
  • 29

1 Answers1

1

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

(require 'mu4e)
(require 'smtpmail)

look at here

manandearth
  • 804
  • 1
  • 9
  • 25
  • Hello, thank you very much for your reply. I have just tried the confuguration with `smtpmail`, but unforunately it is the same as before. When I am composing new messages, they do not show up in the `Sent` directory after successfully sending them. Thanks again. – Julian May 06 '18 at 14:51
  • Sorry, my fault ... I have mistakenly executed `mail-send-and-exit`. I should have run `message-send` instead ;-). Thank you for your help. – Julian May 06 '18 at 22:05