From c814eece5b10e0e6670a0a6af83d3d0a182a093d Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Wed, 6 Aug 2025 00:00:07 +0200 Subject: [PATCH] enabled mu4e --- init.org | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/init.org b/init.org index 078e951..46b7f00 100644 --- a/init.org +++ b/init.org @@ -1570,6 +1570,94 @@ importing and exporting confluence pages. : [nil 26770 1000 217140 nil elpaca-process-queues nil nil 894000 nil] +** Mu4e Configuration + +#+BEGIN_SRC emacs-lisp + (setq snm/mu4e-load-path (concat + (file-name-parent-directory + (file-name-directory + (executable-find "mu"))) + "share/emacs/site-lisp/mu4e")) + + (use-package mu4e + :load-path snm/mu4e-load-path + ;"/usr/share/emacs/site-lisp/mu4e" + :config + + ;; use mu4e for e-mail in emacs + (setq mail-user-agent 'mu4e-user-agent) + + (setq mu4e-drafts-folder "/[Gmail].Drafts") + (setq mu4e-sent-folder "/[Gmail].Sent Mail") + (setq mu4e-trash-folder "/[Gmail].Trash") + + ;; don't save message to Sent Messages, Gmail/IMAP takes care of this + (setq mu4e-sent-messages-behavior 'delete) + + ;; (See the documentation for `mu4e-sent-messages-behavior' if you have + ;; additional non-Gmail addresses and want assign them different + ;; behavior.) + + ;; setup some handy shortcuts + ;; you can quickly switch to your Inbox -- press ``ji'' + ;; then, when you want archive some messages, move them to + ;; the 'All Mail' folder by pressing ``ma''. + + (setq mu4e-maildir-shortcuts + '( (:maildir "/INBOX" :key ?i) + (:maildir "/[Gmail].Sent Mail" :key ?s) + (:maildir "/[Gmail].Trash" :key ?t) + (:maildir "/[Gmail].All Mail" :key ?a))) + + (add-to-list 'mu4e-bookmarks + ;; ':favorite t' i.e, use this one for the modeline + '(:query "maildir:/inbox" :name "Inbox" :key ?i :favorite t)) + + ;; allow for updating mail using 'U' in the main view: + (setq mu4e-get-mail-command "offlineimap") + + ;; something about ourselves + (setq + user-mail-address "pti@snamellit.com" + user-full-name "Peter Tillemans" + message-signature + (concat + "Peter Tillemans\n" + "Snamellit BV\n" + "http://www.smamellit.com\n")) + + ;; sending mail -- replace USERNAME with your gmail username + ;; also, make sure the gnutls command line utils are installed + ;; package 'gnutls-bin' in Debian/Ubuntu + + (require 'smtpmail) + (setq + message-send-mail-function 'smtpmail-send-it + starttls-use-gnutls t + smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) + smtpmail-auth-credentials + '(("smtp.gmail.com" 587 "pti@snamellit.com" (auth-source-pass-get 'secret "snamellit/imap.gmail.com"))) + smtpmail-default-smtp-server "smtp.gmail.com" + smtpmail-smtp-server "smtp.gmail.com" + smtpmail-smtp-service 587) + + ;; alternatively, for emacs-24 you can use: + ;;(setq message-send-mail-function 'smtpmail-send-it + ;; smtpmail-stream-type 'starttls + ;; smtpmail-default-smtp-server "smtp.gmail.com" + ;; smtpmail-smtp-server "smtp.gmail.com" + ;; smtpmail-smtp-service 587) + + ;; don't keep message buffers around + (setq message-kill-buffer-on-exit t) + + ) +#+END_SRC + +#+RESULTS: +: t + + * Editor Features #+BEGIN_SRC emacs-lisp