feat(emacs): msmtp: send mail

This commit is contained in:
Flinner Yuu 2022-04-06 17:36:13 +03:00
parent 045b1c8bd3
commit 22951def80
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
1 changed files with 73 additions and 68 deletions

View File

@ -2167,6 +2167,32 @@ I wrote that, neat isn't it? :P
#+end_src #+end_src
* Email (mu4e) * Email (mu4e)
** Package
#+begin_src emacs-lisp
(use-package mu4e
:demand
;; :ensure-system-package mu
:bind (:map mu4e-main-mode-map
([remap revert-buffer] . mu4e-update-index))
:custom
(mu4e-change-filenames-when-moving t)
(mu4e-html2text-command "iconv -c -t utf-8 | pandoc -f html -t plain")
(mu4e-attachment-dir "~/Downloads")
(mu4e-compose-signature-auto-include t)
(mu4e-get-mail-command "mbsync -a")
(mu4e-update-interval 300)
(mu4e-use-fancy-chars t)
(mu4e-view-show-addresses t)
(mu4e-view-show-images t)
:config
;; (add-to-list 'mu4e-view-actions '("view in browser" . mu4e-view-action))
(add-hook 'mu4e-view-mode-hook #'visual-line-mode)
(add-hook'mu4e-main-mode-hook 'olivetti-mode)
(add-hook 'mu4e-compose-mode-hook 'flyspell-mode)
)
#+end_src
** Contexts ** Contexts
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; assumed Maildir layout ;; assumed Maildir layout
@ -2214,38 +2240,6 @@ I wrote that, neat isn't it? :P
;;Fixing duplicate UID errors when using mbsync and mu4e ;;Fixing duplicate UID errors when using mbsync and mu4e
#+end_src #+end_src
** Package
#+begin_src emacs-lisp
(use-package mu4e
;; :ensure-system-package mu
:config
;; (add-to-list 'mu4e-view-actions '("view in browser" . mu4e-view-action))
(add-hook 'mu4e-view-mode-hook #'visual-line-mode)
(add-hook'mu4e-main-mode-hook 'olivetti-mode)
(add-hook 'mu4e-compose-mode-hook 'flyspell-mode)
:custom
(mu4e-change-filenames-when-moving t)
(mu4e-html2text-command "iconv -c -t utf-8 | pandoc -f html -t plain")
(mu4e-attachment-dir "~/Downloads")
(mu4e-compose-signature-auto-include nil)
(mu4e-get-mail-command "mbsync -a")
(mu4e-update-interval 300)
(mu4e-use-fancy-chars t)
(mu4e-view-show-addresses t)
(mu4e-view-show-images t))
#+end_src
** Send email (msmtp)
#+begin_src emacs-lisp
(setq sendmail-program "/usr/bin/msmtp"
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
send-mail-function 'smtpmail-send-it
message-send-mail-function 'message-send-mail-with-sendmail)
#+end_src
** Email List here! ** Email List here!
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
;; This is a sample, it doesn't get included in init.el ;; This is a sample, it doesn't get included in init.el
@ -2292,10 +2286,21 @@ should only move to trash, not delete entirely from the server
#+end_src #+end_src
Breaking change betweeen =mu4e-alert= and =mu= :( Breaking change betweeen =mu4e-alert= and =mu= :(
(I don't use =mu4e-alert= anymore, but will keep this cuz y not?)
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defvaralias 'mu4e~context-current 'mu4e--context-current) (defvaralias 'mu4e~context-current 'mu4e--context-current)
#+end_src #+end_src
** Send email (msmtp)
#+begin_src emacs-lisp
(setq sendmail-program "/usr/bin/msmtp"
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
send-mail-function 'smtpmail-send-it
message-send-mail-function 'message-send-mail-with-sendmail)
#+end_src
* Telega * Telega
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package telega (use-package telega