summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el53
1 files changed, 4 insertions, 49 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 39232eac..ff423f94 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1126,54 +1126,6 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :init (progn
           (apheleia-global-mode +1)))
 
-;;; E-mail
-
-(declare-function sendmail-send-it "sendmail")
-(setq send-mail-function #'sendmail-send-it)
-
-(use-package mu4e
-  :if (executable-find "mu")
-  :commands (mu4e)
-  :defines (mu4e-contexts)
-  :general (:keymaps 'mu4e-headers-mode-map
-                     :states 'normal
-                     "d" #'mu4e-headers-mark-for-trash
-                     "T" #'mu4e-headers-mark-thread)
-  (:keymaps 'mu4e-view-mode-map
-            :states 'normal
-            "d" #'mu4e-view-mark-for-trash)
-  :init (progn
-          (with-eval-after-load 'evil-ex
-            (evil-ex-define-cmd "mu[4e]" #'mu4e)))
-  :config (progn
-            (setq mail-user-agent #'mu4e-user-agent
-                  mu4e-maildir "~/mail"
-                  mu4e-context-policy 'pick-first
-                  mu4e-update-interval 600
-                  mu4e-change-filenames-when-moving t
-                  mu4e-index-lazy-check t
-                  mu4e-hide-index-messages t
-                  mu4e-compose-format-flowed t
-                  mu4e-contexts (list
-                                 (make-mu4e-context
-                                  :name "SatoshiPay"
-                                  :match-func (lambda (msg)
-                                                (if msg
-                                                    (mu4e-message-contact-field-matches
-                                                     msg :to ".*@satoshipay.io")
-                                                  (string-equal (system-name) "satoshipad")))
-                                  :vars '((user-mail-address . "alan@satoshipay.io")
-                                          (mu4e-sent-messages-behavior . delete)
-                                          (mu4e-drafts-folder . "/satoshipay/[Gmail]/Drafts")
-                                          (mu4e-sent-folder . "/satoshipay/[Gmail]/Sent Mail")
-                                          (mu4e-refile-folder . "/satoshipay/[Gmail]/All Mail")
-                                          (mu4e-trash-folder . "/satoshipay/[Gmail]/Bin")
-                                          (mu4e-maildir-shortcuts . (("/satoshipay/INBOX" . ?i)
-                                                                     ("/satoshipay/[Gmail]/All Mail" . ?a)
-                                                                     ("/satoshipay/[Gmail]/Sent Mail" . ?s)
-                                                                     ("/satoshipay/[Gmail]/Spam" . ?p)
-                                                                     ("/satoshipay/[Gmail]/Spam" . ?j)))))))))
-
 ;;; Take me to my leader
 
 (my-leader-def
@@ -1219,7 +1171,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   "xx" #'eval-defun
   "xi" #'consult-imenu)
 
-(load (expand-file-name "mail.el" user-emacs-directory) :noerror :nomessage)
+(let ((mail-config (expand-file-name "mail.el" user-emacs-directory)))
+  (if (file-readable-p mail-config)
+      (load mail-config :noerror :nomessage)))
+
 
 ;; # Local Variables:
 ;; # flycheck-disabled-checkers: 'emacs-lisp-checkdoc