Emacs is a very powerful editor, therefore there are many benefits from using it as an email client, such as direct integration with org-mode for todo and task management or the amazing editing capabilities of Emacs to write emails.
However, Emacs cannot do this natively, but there is great integration with a tool called
mu. This tool is an indexer for your emails, and keeps track of them so that they are easily and quickly searchable. The author of this tool also wrote an emacs-lisp file that queries
mu and provides a user interface in emacs to better interact with it and use it to read emails.
mu requires the emails to already be on the computer though, so the first step is to download them using IMAP.
IMAP is a protocol that can be used to download a copy of your emails from the server. A great tool to use to download them using IMAP is
mbsync. In arch linux, this tool can be downloaded from the official repository using
This command line utility has to first be set up using a config file, which is usually located in
~/.mbsyncrc, so that it knows where to download the emails from and how to authenticate properly.
The most important parts to set up in the config file are
to setup the account, and then the following to setup the directories where it should download emails to
It should then be mostly ready to download all the emails. If using two factor authentication, one can generate an app password which can be used instead of the user password.
mbsync is configured, the emails can be downloaded using
Indexing the Emails
Once they are downloaded (in this case in the
mu also has an emacs-lisp plugin, the following will also work after it has been configured correctly in emacs.
mu in emacs as well, one first has to load the emacs lisp file using
mu4e can be configured with different things like the home directory, and shortcuts that should be used in emacs. The full configuration can be seen in my Emacs configuration, which is hosted on Github
Sending emails from Emacs requires a different protocol which is SMTP, however, that is already included in Emacs. The most basic setup can be seen below.
Emacs is now ready to be used as a full featured email client.