doomemacs/modules/email/mu4e
Henrik Lissner a3e262c7ac
💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
..
autoload Conform many modules to new conventions 2019-07-23 12:30:47 +02:00
config.el 💥 Refactor add-hook! macro & change arg order 2019-07-26 20:17:29 +02:00
packages.el Add email/{wanderlust,mu4e,notmuch} modules 2019-05-05 14:14:12 -04:00
README.org Add email/{wanderlust,mu4e,notmuch} modules 2019-05-05 14:14:12 -04:00

email/mu4e

Description

This module makes Emacs an email client, using mu4e.

I want to live in Emacs, but as we all know, living is incomplete without email. So I prayed to the text editor gods and they (I) answered. Emacs+evil's editing combined with org-mode for writing emails? Yes please.

It uses mu4e to read my email, but depends on offlineimap (to sync my email via IMAP) and mu (to index my mail into a format mu4e can understand).

Module Flags

  • +gmail Enables gmail-specific configuration.

Prerequisites

This module requires:

  • Either mbsync (default) or offlineimap (to sync mail with)
  • mu (to index your downloaded messages)

MacOS

brew install mu --with-emacs
# And one of the following
brew install isync  # mbsync
brew install offlineimap

Arch Linux

sudo pacman --noconfirm --needed -S mu
# And one of the following
sudo pacman -S isync  # mbsync
sudo pacman -S offlineimap

TODO Features

Configuration

offlineimap

This module uses mbsync by default. To change this, change +mu4e-backend:

(setq +mu4e-backend 'offlineimap)

Then you must set up offlineimap and index your mail:

  1. Write a \~/.offlineimaprc. Mine can be found in my dotfiles repository. It is configured to download mail to \~/.mail. I use unix pass to securely store my login credentials.
  2. Download your email: offlineimap -o (may take a while)
  3. Index it with mu: mu index --maildir ~/.mail

Then configure Emacs to use your email address:

;; Each path is relative to `+mu4e-mu4e-mail-path', which is ~/.mail by default
(set-email-account! "Lissner.net"
  '((mu4e-sent-folder       . "/Lissner.net/Sent Mail")
    (mu4e-drafts-folder     . "/Lissner.net/Drafts")
    (mu4e-trash-folder      . "/Lissner.net/Trash")
    (mu4e-refile-folder     . "/Lissner.net/All Mail")
    (smtpmail-smtp-user     . "henrik@lissner.net")
    (user-mail-address      . "henrik@lissner.net")
    (mu4e-compose-signature . "---\nHenrik Lissner"))
  t)

TODO mbsync