jmail is an e-mail environment for Emacs.
It depends on the following tools:
Tools | Version tested | Comments |
---|---|---|
mu | 1.9.0 | index/search |
msmtp | 1.8.21 | smtp multi accounts |
mbsync (optional) | 1.4.4 | sync emails |
feed2exec (optional) | 0.18.0 | fetch rss |
;; jmail
(require 'jmail)
;; Mail User Agent
(setq mail-user-agent 'jmail-user-agent)
;; top maildir
(setq jmail-top-maildir "~/.cache/mails")
;; mbsync config file
(setq jmail-sync-config-file "~/.mbsyncrc")
;; msmtp config file
(setq jmail-smtp-config-file "~/.msmtprc")
;; add Starred query (no group)
(jmail-add-query :name "Starred"
:query "flag:flagged"
:thread nil
:auto-fold-thread nil
:related nil)
;; add Gmail queries
(jmail-add-group :name "Gmail"
:query "maildir:/Gmail/Emacs and maildir:/Gmail/Github and maildir:/Gmail/INBOX"
:thread t
:auto-fold-thread t
:related t)
(jmail-add-query-to-group "Gmail"
:name "Emacs"
:query "maildir:/Gmail/Emacs"
:thread t
:auto-fold-thread t
:related t)
(jmail-add-query-to-group "Gmail"
:name "Github"
:query "maildir:/Gmail/Github"
:thread t
:auto-fold-thread nil
:related t)
(jmail-add-query-to-group "Gmail"
:name "INBOX"
:query "maildir:/Gmail/INBOX"
:thread t
:auto-fold-thread t
:related t)
(jmail-add-query-to-group "Gmail"
:name "Sent"
:query "maildir:/Gmail/Sent"
:thread nil
:auto-fold-thread nil
:related nil)
;; sync/refresh every 60 seconds
(setq jmail-sync-refresh-every 60)
For more complete config, please look at mine perso-config.