0

What I like about my mbsync/mu4e setup is that I can download all my email and then read it all and respond to it all offline. But this doesn't work for sending mail, since if I'm offline, it won't let me send a message. How do you configure mu4e so that if you're offline, it puts your message in an outbox, and then sends it as soon as it gets a connection?

2

The mu4e manual node on queuing mail explains how to do this. Quoting the manual:

If you cannot send mail right now, for example because you are currently offline, you can queue the mail, and send it when you have restored your internet connection. You can control this from the Main view.

To allow for queuing, you need to tell smtpmail where you want to store the queued messages. For example:

(setq smtpmail-queue-mail t  ;; start in queuing mode

      smtpmail-queue-dir   "~/Maildir/queue/cur")

For convenience, we put the queue directory somewhere in our normal maildir. If you want to use queued mail, you should create this directory > before starting mu4e. The mu mkdir command may be useful here, so for example:

$ mu mkdir ~/Maildir/queue

$ touch ~/Maildir/queue/.noindex

The file created by the touch command tells mu to ignore this directory for indexing, which makes sense since it contains smtpmail meta-data rather than normal messages; see the mu-mkdir and mu-index man-pages for details.

Warning: when you switch on queued-mode, your messages won’t reach their > destination until you switch it off again; so, be careful not to do this accidentally!

  • So, it'd be a matter of writing something to check whether emacs was connected to the Internet, and if it wasn't, turning on this variable? And then turning it off once it was connected again? Do you know how that would work? – Jonathan Dec 9 '17 at 1:37
  • @Jon : sorry, I don’t know how to do that. I’d like to know, though, so please post an answer if you figure it out. – Dan Dec 9 '17 at 10:10
  • Is there a way to view your queued emails in mu4e like any other mailbox? – AstroFloyd Nov 4 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.