From 28fdbbec65ef8128fc577929ee527291cd501a9c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 23 Jun 2020 20:37:53 +0200 Subject: Basic eMail setup using home-manager account system and mu4e --- gui/conf/init.el | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'gui/conf') diff --git a/gui/conf/init.el b/gui/conf/init.el index 206d228..7af778e 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -73,6 +73,9 @@ (global-evil-leader-mode 1) (evil-leader/set-leader ",")) +(use-package evil-collection + :ensure t) + (use-package minions :ensure t :config @@ -345,3 +348,39 @@ (lambda () (define-key eshell-mode-map (kbd "") (lambda () (interactive) (completion-at-point))))) + +(use-package mu4e + :config + (setq mu4e-maildir "~/mail") + (setq mu4e-get-mail-command "mbsync -a") + (setq mu4e-use-fancy-chars t) + (setq mu4e-change-filenames-when-moving t) + (setq sendmail-program "msmtp" + send-mail-function 'smtpmail-send-it + message-sendmail-f-is-evil t + message-send-mail-function 'message-send-mail-with-sendmail) + (evil-collection-init 'mu4e)) + +(setq mu4e-contexts + `(,(make-mu4e-context + :name "private" + :match-func (lambda (msg) + (when msg + (string-match-p "^/automatix" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "adrian@kummerlaender.eu") + (user-full-name . "Adrian Kummerländer") + (mu4e-sent-folder . "/automatix/Sent") + (mu4e-drafts-folder . "/automatix/Drafts") + (mu4e-trash-folder . "/automatix/Trash") + (message-sendmail-extra-arguments . ("--read-envelope-from" "--account=automatix")))) + ,(make-mu4e-context + :name "KIT" + :match-func (lambda (msg) + (when msg + (string-match-p "^/kit" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "adrian.kummerlaender@student.kit.edu") + (user-full-name . "Adrian Kummerländer") + (mu4e-sent-folder . "/kit/Sent") + (mu4e-drafts-folder . "/kit/Drafts") + (mu4e-trash-folder . "/kit/Trash") + (message-sendmail-extra-arguments . ("--read-envelope-from" "--account=kit")))))) -- cgit v1.2.3