Use mu4e. I use that in conjunction with offlineimap.
I used to use gnus, but it was too slow and didn't have a good way to search mail. mu4e has a super-quick search and loads quickly.
I haven't really worried about html mail -- I just pull those up in webmail. But if I ever get motivated, I'll figure that out.
I found mu to be pretty good for interactive use.
eg:
mu --maildir=~/mail f: s:"important" --fields=l | xargs mv -t ~/mail/important/cur/
(add-to-list 'helm-find-files-actions '("Attach files for mu4e" . helm-mu4e-attach) t)
(defun helm-mu4e-attach (_file) (gnus-dired-attach (helm-marked-candidates)))
It also use gnus-dired
to accomplish the core function, so that dired setup is needed (partly, I guess last sexp is not necessary):
(require 'gnus-dired) ;; make the `gnus-dired-mail-buffers' function also work on ;; message-mode derived modes, such as mu4e-compose-mode (defun gnus-dired-mail-buffers () "Return a list of active message buffers." (let (buffers) (save-current-buffer (dolist (buffer (buffer-list t)) (set-buffer buffer) (when (and (derived-mode-p 'message-mode) (null message-sent-message-via)) (push (buffer-name buffer) buffers)))) (nreverse buffers)))
(setq gnus-dired-mail-mode 'mu4e-user-agent) (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
i can't speak highly enough of mu4e as an MUA. For a long time i used Mutt, with emails stored in maildir format in quite a number of folders containing >80,000 emails. Overall i was happy with it, but i really wanted to be able to do all my email-related stuff natively within Emacs. i looked into Gnus[1], Rmail, VM, Wanderlust and Mew; but they either lacked maildir support (non-negotiable) or i found them too complex and confusing to set up (and i'm saying this as a longtime Mutt user!).
Then i discovered mu4e. It was pretty straightforward to set up. Within 24 hours i was singing its praises. :-) Its UI is, for me, straightforward and intuitive; it feels 'Emacsy' to me. Its use of the mu indexing engine means i no longer need to use notmuch. Overall i've found it quite easy to customise. And it's very actively maintained.
So, yeah. i'm quite the fan of mu4e. :-)
[1] Gnus as a news reader, i loved. But as an MUA? Just .... no.
mu4e supports address autocompletion out-of-the-box (see http://www.djcbsoftware.nl/code/mu/mu4e/Address-autocompletion.html). For adding addresses to an org-contacts file see http://www.djcbsoftware.nl/code/mu/mu4e/Org_002dcontacts.html.
mu cfind --format=org-contact
generates a contact list in org format.
There is an example in the manual for gmail: http://www.djcbsoftware.nl/code/mu/mu4e/Gmail-configuration.html
I'd recommend using mbsync instead of offlineimap, though, as the former has been much faster for me.
Umm, I've got offlineimap
running as a long running process due to some combination of the following options in my offlineimaprc
that makes it poll my INBOX for new messages all the time, and do an all-folders refresh every five minutes. I can't quite recall which options are doing what, though :(
[Account Work] ... maxage = 1 autorefresh = 5 quick = 5
[Repository Remote] ... idlefolders = ['INBOX'] holdconnectionopen = yes maxconnections = 3 keepalive = 29
Then apparently mu4e
provides <code>mu4e-index-updated-hook</code> (see item #4) which you can set up to notify you via your method of choice. The linked page says that hook gets called every time an update happens, not just on new messages, which is unfortunate... except I've seen it used in a few different people's configs to do unread-mail notification, so, perhaps it is what you're looking for ?
It seems reasonable thatmu4e
would provide some elisp that lets you check whether a folder has an unread message, which you could call in the hook to determine whether to do the notification.
Thanks. This link, though, makes me think that that functionality doesn't work in mu4e anymore. Is that not the case?
Look, the configuration of mu4e to get started with a gmail account is minimal: http://www.djcbsoftware.nl/code/mu/mu4e/Gmail-configuration.html#Gmail-configuration
> (and I still haven't started to play with the famous Org mode or Gnus).
org mode is great. I think that almost anyone could benefit from making at least some use of it. I don't use it as a PIM, but it's a good organizer or simply way to make structured notes.
I'm much less enthusiastic about Gnus, which makes for a good NNTP reader but has a lot of functionality that's really aimed more at news. I was also unhappy with its sluggish use via IMAP.
I was quite happy with mu4e, though you're free to try others.
I've started using it too, and I'm very happy with mu4e as well.
Over the past fifteen years, I've tried using VM, which was sluggish to thread mailboxes.
I've also tried gnus. It has a lot of complexity, like expiration, that appears to only really be useful for nntp. I like the idea of merging NNTP and mail (and, heck, RSS too would be nice), but I found that it took a lot of work to understand and configure, and some operations that I really expected of a mailreader (pulling down the next message from an IMAP server when paging through a list) were painfully-slow.
mu4e is surprisingly simple to learn and very responsive. mu4e basically stores all your emails in a big mass and expects you to search through all of them to generate dynamic lists, which you view in realtime.
One side-effect of this is that mu4e doesn't (unless I'm missing something obvious) appear to have a way to operate as a to-do list. I used to move emails that require work from me into a mailbox to work on. I suspect that the "mu4e way" to do this is to move to org-mode to maintain to-do lists with links to the emails in question and not mutate the email itself; mu4e just provides access to emails and to saved searches of emails, which is pretty much all that is actually required.
Check out mu4e. It works using offlineimap for retrieval, then indexing it locally and providing emacs frontend to messages. For composing, it relies on emacs message mode.
In my experience, GNUS was strange and I've never got into it. It always feels like it was not designed for IMAP/mail. It worked better with offlineimap. I've tried Wanderlust and overall experience was better, but it was slow like a hell, even after heavy tuning and turning on local caches. Maybe it's because Gmail IMAP feels slow in general, I don't know.
GUI or CLI?
For the former I have no recommendation as I've only ever used Thunderbird extensively, which I found to be the most reliable and least annoying option not part of a specific DE.
For the latter I recommend you check out the aforementioned <em>mutt</em>/<em>neomutt</em> and, if you're an Emacs user, <em>mu4e</em>.
Better than notmuch is mu http://www.djcbsoftware.nl/code/mu/ for indexing, it works faster and I tried notmuch on multiple computers, it cannot handle email maildirs of 400,000 such as mu can do it.
​
I have tried imapsync and mbsync, those do work, but GNU Emacs has its own movemail program and I am using movemail from GNU mailutils to move mail from IMAP to local computer and it is reliable and actively maintained and GNU mailutils have moch mure features to move mail from one server to others, it could be possible to move to multiple servers from IMAP to IMAP.
I have a binding in my muttrc which calls mu find --clearlinks --format=links --linksdir=~/mail/SEARCH
. You just have to enter some keywords to search and it links the results in ~/mail/SEARCH, so just navigate to this mailbox to get the answers.
Otherwise, you also have to index you mailboxes, I do that once a day with a (user) systemd service which runs mu index --quiet -m ~/mail
moar info on mu: http://www.djcbsoftware.nl/code/mu/
Mu4e added a "contexts" feature in version 0.9.16 to make it easier to use it with multiple accounts. Look at the mu4e documentation for details. The examples in the documentation show how to do exactly what you have asked.
The examples in the mu4e manual for contexts guess which context to use when composing mail based on the To:
field of the message you're replying to. Sometimes I get email which doesn't have my address in the To:
field though, such as mail from an email list. I find the most reliable way to switch to the correct context is by looking at the message maildir, like this:
(defun mu4e-message-maildir-matches (msg rx) (when rx (if (listp rx) ;; if rx is a list, try each one for a match (or (mu4e-message-maildir-matches msg (car rx)) (mu4e-message-maildir-matches msg (cdr rx))) ;; not a list, check rx (string-match rx (mu4e-message-field msg :maildir)))))
(setq mu4e-contexts `( ,(make-mu4e-context :name "work" :enter-func (lambda () (mu4e-message "Switch to the work context")) ;; leave-func not defined :match-func (lambda (msg) (when msg (mu4e-message-maildir-matches msg "^/work"))) :vars '( ( user-mail-address . "" ) ( mu4e-drafts-folder . "/work/drafts" ) ( mu4e-sent-folder . "/work/sent" ) ( user-full-name . "Divinenephron" ) ( mu4e-compose-signature . "Divinenephron\n" )))))
I've actually switched from mutt to mu4e, and I really like it.
> loading reply-to and signatures in response to the email address
I'm not sure exactly what you want to do or how pretty it would be, but you can probably do this with mu4e's hooks (specifically the compose-pre one).
> bit leery of putting my email in Emacs too
Assuming you're using a maildir already with mutt (mu4e requires using mbsync or offlineimap), you can pretty much use both with the maildir without any problems.
I personally use mu4e+offlineimap to access Office 365 email (my university uses it). I suggest you get started with it with the example Gmail configuration in the mu4e manual.
You will of course have to modify the example configuration's server name, user name and password for your Office 365 account. You'll have to change the names of mu4e-drafts-folder
, mu4e-sent-folder
and mu4e-trash-folder
too. Less obviously you'll need to change mu4e-sent-messages-behavior
. Change it like below so mu4e moves sent messages into your sent folder. Unlike Gmail, Office 365 doesn't do this automatically.
(setq mu4e-sent-messages-behavior 'sent)
I personally use and like Gnus coupled with offlineimap and/or Davmail (School won't enable IMAP...), but if Gnus no longer floats your boat, my next suggestion is mu4e
EDIT: Should have read the full post. This requires external packages.
>How much more text-based can email get if you're using your text editor to write and read your emails?
The various emacs mail clients typically do support graphical features, like inline images and proportional fonts, if running in a non-terminal window. I normally use emacs in a terminal, but I know people who rarely do.