57 lines
2.1 KiB
EmacsLisp
57 lines
2.1 KiB
EmacsLisp
|
;;; 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
|