From c3d2fbf04c3aa2c1aebafbd8949ade2165aa0484 Mon Sep 17 00:00:00 2001 From: larstvei Date: Sun, 29 Jan 2023 17:57:05 +0100 Subject: [PATCH] Add org-msg for composing email with org-mode --- init.org | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/init.org b/init.org index 9fd882e..f5a831a 100644 --- a/init.org +++ b/init.org @@ -216,6 +216,7 @@ olivetti ; Minor mode for a nice writing environment org ; Outline-based notes management and organizer org-bullets ; Show bullets in org-mode as UTF-8 characters + org-msg ; Org mode to send and reply to email in HTML paredit ; minor mode for editing parentheses pdf-tools ; Emacs support library for PDF files projectile ; Manage and navigate projects in Emacs easily @@ -628,13 +629,13 @@ (when load-mail-setup (with-eval-after-load 'mu4e (setq + mail-user-agent 'mu4e-user-agent user-full-name "Lars Tveito" ; Your full name user-mail-address "larstvei@ifi.uio.no" ; And email-address - 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 @@ -649,7 +650,23 @@ mu4e-trash-folder "/Deleted Items" mu4e-trash-folder "/Drafts" - mu4e-use-fancy-chars t)) + mu4e-use-fancy-chars t) + + (require 'org) + (require 'org-msg) + + (add-to-list 'mu4e-compose-pre-hook 'org-msg-mode) + (setq org-msg-enforce-css (concat user-emacs-directory "email-style.css") + org-msg-options "html-postamble:nil toc:nil num:nil author:nil email:nil" + org-msg-default-alternatives '((new . (text html)) + (reply-to-html . (text html)) + (reply-to-text . (text))) + org-msg-signature "#+begin_signature + ,#+begin_export html + + - Lars + ,#+end_export + ,#+end_signature")) (autoload 'mu4e "mu4e" nil t)) #+end_src