;;; +mail.el -*- lexical-binding: t; -*- ;; Mu4e configuration ;; ;; Set up the default email identity (setq user-full-name "Amin Kasrou Aouam") ;; Use msmtp to send email (setq sendmail-program (executable-find "msmtp") send-mail-function #'smtpmail-send-it message-sendmail-f-is-evil t message-sendmail-extra-arguments '("--read-envelope-from") message-send-mail-function #'message-send-mail-with-sendmail) ;; Account configuration (set-email-account! "gmail" '((mu4e-sent-folder . "/gmail/sent") (mu4e-drafts-folder . "/gmail/drafts") (mu4e-trash-folder . "/gmail/trash") (mu4e-refile-folder . "/gmail/archive") (smtpmail-smtp-user . "akasroua@gmail.com") (user-mail-address . "akasroua@gmail.com")) t) (set-email-account! "ugent" '((mu4e-sent-folder . "/ugent/sent") (mu4e-drafts-folder . "/ugent/drafts") (mu4e-trash-folder . "/ugent/trash") (mu4e-refile-folder . "/ugent/archive") (smtpmail-smtp-user . "amin.kasrouaouam@ugent.be") (user-mail-address . "amin.kasrouaouam@ugent.be")) t) (set-email-account! "disroot" '((mu4e-sent-folder . "/disroot/sent") (mu4e-drafts-folder . "/disroot/drafts") (mu4e-trash-folder . "/disroot/trash") (mu4e-refile-folder . "/disroot/archive") (smtpmail-smtp-user . "akasroua@disroot.org") (user-mail-address . "akasroua@disroot.org")) t) ;; Configure mu4e contexts (setq mu4e-context-policy 'ask-if-none mu4e-compose-context-policy 'ask-if-none) ;; Run lazy check when syncing (setq mu4e-index-lazy-check t) ;; Use ISO dates (setq mu4e-headers-date-format "%Y-%m-%d %H:%M") ;; Disable colors for HTML emails (setq shr-use-colors nil) ;; Use shortcuts to access inboxes easily (setq mu4e-maildir-shortcuts '(("/disroot/inbox" . ?d) ("/gmail/inbox" . ?g) ("/ugent/inbox" . ?u))) ;; Change mu4e bookmarks (setq mu4e-bookmarks '((:name "Unread messages" :query "flag:unread AND NOT flag:trashed" :key 117) (:name "Today's messages" :query "date:today..now" :key 116) (:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119)))