Emacs: Add email configuration.
This commit is contained in:
parent
b9864b6f02
commit
bf394af55f
56
init.d/misc/email.el
Normal file
56
init.d/misc/email.el
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
;;; email.el --- Email setup -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Time-stamp: <2020-03-28T02:08:49+0100>
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'basics/package-management)
|
||||||
|
|
||||||
|
(when (and (executable-find "mu")
|
||||||
|
(file-exists-p "~/email/tzend"))
|
||||||
|
(use-package mu4e
|
||||||
|
:straight nil ; Installed by package “mu”.
|
||||||
|
:after (ivy)
|
||||||
|
:commands (mu4e-get-maildirs
|
||||||
|
mu4e-mark-handle-when-leaving
|
||||||
|
mu4e-headers-search)
|
||||||
|
:functions (ivy-completing-read)
|
||||||
|
:custom ((mu4e-maildir "~/email/tzend")
|
||||||
|
(mu4e-trash-folder "/Trash")
|
||||||
|
(mu4e-sent-folder "/Sent")
|
||||||
|
(mu4e-drafts-folder "/Drafts")
|
||||||
|
(mu4e-refile-folder "/keep")
|
||||||
|
(mu4e-get-mail-command "mbsync -c ~/.config/mbsync/config tzend")
|
||||||
|
(mu4e-update-interval (* 60 10))
|
||||||
|
(mu4e-use-fancy-chars t)
|
||||||
|
(mu4e-view-show-images t)
|
||||||
|
(mu4e-view-show-addresses t)
|
||||||
|
;; Don't render HTML.
|
||||||
|
(mu4e-view-html-plaintext-ratio-heuristic most-positive-fixnum)
|
||||||
|
(mu4e-attachment-dir "~/Downloads")
|
||||||
|
(mu4e-compose-signature-auto-include nil)
|
||||||
|
(mu4e-user-agent-string nil))
|
||||||
|
:config (progn
|
||||||
|
(defun mu4e~headers-jump-to-maildir ()
|
||||||
|
"Overload that uses ivy."
|
||||||
|
(interactive)
|
||||||
|
(let ((maildir (ivy-completing-read
|
||||||
|
"Jump to maildir: " (mu4e-get-maildirs))))
|
||||||
|
(when maildir
|
||||||
|
(mu4e-mark-handle-when-leaving)
|
||||||
|
(mu4e-headers-search (format "maildir:\"%s\"" maildir))))))
|
||||||
|
:bind ("C-X m" . mu4e)))
|
||||||
|
|
||||||
|
(use-package smtpmail
|
||||||
|
:custom ((message-send-mail-function #'smtpmail-send-it)
|
||||||
|
(mu4e-sent-messages-behavior 'sent)
|
||||||
|
(smtpmail-smtp-server "cryptoparty-celle.de")
|
||||||
|
(smtpmail-local-domain "tastytea.de")
|
||||||
|
(smtpmail-smtp-user "tastytea")
|
||||||
|
(smtpmail-stream-type 'starttls)
|
||||||
|
(smtpmail-smtp-service "submission")))
|
||||||
|
|
||||||
|
(provide 'misc/email)
|
||||||
|
;;; email.el ends here
|
3
init.el
3
init.el
|
@ -1,6 +1,6 @@
|
||||||
;;; init.el --- tastytea's Emacs init file. -*- lexical-binding: t; -*-
|
;;; init.el --- tastytea's Emacs init file. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-27T21:25:59+0100>
|
;; Time-stamp: <2020-03-27T21:27:43+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Requires at least Emacs 26.
|
;; Requires at least Emacs 26.
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
(require 'text/misc)
|
(require 'text/misc)
|
||||||
|
|
||||||
(require 'misc/documentation)
|
(require 'misc/documentation)
|
||||||
|
(require 'misc/email)
|
||||||
|
|
||||||
(require 'programming/common)
|
(require 'programming/common)
|
||||||
(require 'programming/lsp)
|
(require 'programming/lsp)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user