emacs.d

My Emacs configuration files.
git clone git://soucy.cc/emacs.d.git
Log | Files | Refs | README

commit cae6aa4a5052d30d6d6451a18ea8e9a3ec33574c
parent 4196e57a8d8c743480e1344c1d51fef2e84d75d1
Author: Hugo Soucy <hugo.soucy@toumoro.com>
Date:   Sat,  4 Apr 2020 21:31:05 -0400

Clean the email config

Diffstat:
Mpartials/email.el | 68+++++++++++++++++++++++++++++---------------------------------------
1 file changed, 29 insertions(+), 39 deletions(-)

diff --git a/partials/email.el b/partials/email.el @@ -1,43 +1,33 @@ -;; EMAIL SETUP FILE -(setq user-full-name "Hugo Soucy") -(if (eq (system-name) 'hs0ucy-t590) - (setq user-mail-address "hugo.soucy@toumoro.com") - (setq user-mail-address "hugo@soucy.cc") - ) +;;; Email setup for mu4e -(use-package mu4e - ;; Mail client for Emacs. - :ensure t - :config - (if (not (eq system-type 'darwin)) - ;; Using Maildir if not on Mac OS X - (setq mu4e-maildir (expand-file-name "~/Maildir")) - ;; else use .Mail - (setq mu4e-maildir (expand-file-name "~/.Mail"))) +;;; Code +(setq user-full-name (getenv "NAME")) +(setq user-mail-address (getenv "EMAIL")) - (setq mu4e-sent-folder "/Sent") - (setq mu4e-drafts-folder "/Drafts") - (setq mu4e-trash-folder "/Trash") +(require 'mu4e) +(require 'mu4e-contrib) - (if (not (eq system-type 'darwin)) - ;; command used to get mail - ;; use this to sync with mbsync - (setq mu4e-get-mail-command "mbsync hscc") - ;; else offlineimap - (setq mu4e-get-mail-command "offlineimap hscc") - ) - ;; use this for testing - ;; (setq mu4e-get-mail-command "true") +(setq mu4e-maildir (expand-file-name "~/.maildir/hugo@soucy.cc/")) +(setq mu4e-sent-folder "/Sent") +(setq mu4e-drafts-folder "/Drafts") +(setq mu4e-trash-folder "/Trash") - ;; rename files when moving - ;; NEEDED FOR MBSYNC - (setq mu4e-change-filenames-when-moving t) - ;; Send mail - ;; tell message-mode how to send mail - (setq message-send-mail-function 'smtpmail-send-it) - ;; if our mail server lives at smtp.example.org; if you have a local - ;; mail-server, simply use 'localhost' here. - (setq smtpmail-smtp-server "mail.gandi.net") - (setq smtpmail-smtp-user "hugo@soucy.cc") - (setq smtpmail-debug-info t) - ) +(setq mu4e-get-mail-command "mbsync hscc") + +;; Use this for testing +(setq mu4e-get-mail-command "true") +;;; Show entire email & name +(setq mu4e-view-show-addresses t) +;;; Saves attachments to Downloads +(setq mu4e-attachment-dir "~/Downloads") + +;;; Reading ugly HTML mails +(setq mu4e-html2text-command 'mu4e-shr2text + shr-color-visible-luminance-min 60 + shr-color-visible-distance-min 5 + shr-use-fonts nil + shr-use-colors nil) +(advice-add #'shr-colorize-region + :around (defun shr-no-colourise-region (&rest ignore))) + +;;; email.el ends here