summaryrefslogtreecommitdiffstats
path: root/.emacs.d/jd/jd-mu4e.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/jd/jd-mu4e.el')
-rwxr-xr-x.emacs.d/jd/jd-mu4e.el79
1 files changed, 79 insertions, 0 deletions
diff --git a/.emacs.d/jd/jd-mu4e.el b/.emacs.d/jd/jd-mu4e.el
new file mode 100755
index 0000000..e97c4fc
--- /dev/null
+++ b/.emacs.d/jd/jd-mu4e.el
@@ -0,0 +1,79 @@
1(when (not jd/guix-p)
2 (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e"))
3
4(jd/use-package htmlize "emacs-htmlize")
5
6; (jd/add-package-to-manifest "mbsync") ;; TODO: Define guix mbsync package?
7
8(jd/use-package mu4e "mu"
9 :defer 10
10 :ensure nil
11 :config
12 (require 'org-mu4e)
13
14 (setq mu4e-mu-binary "/usr/local/bin/mu")
15 (setq mu4e-update-interval (* 10 60))
16 (setq mu4e-get-mail-command "mbsync -a")
17 (setq mu4e-maildir "~/Mail")
18
19 (setq mu4e-completing-read-function #'ivy-completing-read)
20
21 (setq mu4e-change-filenames-when-moving t)
22
23 (setq mu4e-contexts
24 `(,(make-mu4e-context
25 :name "Abaks"
26 :match-func (lambda (msg) (when msg
27 (string-prefix-p "/abaks" (mu4e-message-field msg :maildir))))
28 :vars '(
29 (user-full-name . "Jakub Dlugosz")
30 (user-mail-address . "jakub@abaks.pl")
31 (mu4e-sent-folder . "/abaks/Sent Items")
32 (mu4e-trash-folder . "/abaks/Trash")
33 (mu4e-drafts-folder . "/abaks/Drafts")
34 (mu4e-refile-folder . "/abaks/Archive")
35 (smtpmail-local-domain . "pl")
36 (smtpmail-smtp-server . "smtp.abaks.pl")
37 (mu4e-sent-messages-behavior . sent)
38 ))
39 ,(make-mu4e-context
40 :name "Gmail"
41 :match-func (lambda (msg) (when msg
42 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
43 :vars '(
44 (user-full-name . "Jakub Dlugosz")
45 (user-mail-address . "jdlugosz963@gmail.com")
46 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
47 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
48 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
49 (mu4e-refile-folder . "/gmail/Archive")
50 (smtpmail-local-domain . "com")
51 (smtpmail-smtp-server . "smtp.gmail.com")
52 (mu4e-sent-messages-behavior . sent)
53 ))))
54
55 (setq mail-user-agent 'mu4e-user-agent
56 mail-host-address nil
57 message-send-mail-function 'smtpmail-send-it
58 smtpmail-smtp-service 465
59 smtpmail-stream-type 'ssl)
60
61 (setq mu4e-compose-signature (concat
62 "Pozdrawiam,\n"
63 "Jakub Długosz"))
64
65 (mu4e t))
66
67(jd/use-package mu4e-alert "emacs-mu4e-alert"
68 :defer 20
69 :config
70 (mu4e-alert-set-default-style 'libnotify)
71 (mu4e-alert-enable-mode-line-display)
72 (mu4e-alert-enable-notifications)
73
74 (jd/leader-key-def
75 "m" '(:ignore t :which-key "mail")
76 "mm" 'mu4e
77 "mc" 'mu4e-compose-new))
78
79(provide 'jd-mu4e)