diff options
Diffstat (limited to 'custom/jao-custom-email.el')
| -rw-r--r-- | custom/jao-custom-email.el | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el index a3d1a92..aba3e21 100644 --- a/custom/jao-custom-email.el +++ b/custom/jao-custom-email.el @@ -2,16 +2,15 @@ ;;; main email system (require 'jao-afio) -(setq jao-afio-mail-function 'gnus) -;; (setq jao-afio-mail-function 'notmuch) +(setq jao-afio-mail-function (jao-d-l 'notmuch 'notmuch)) (defvar jao-notmuch-enabled (eq jao-afio-mail-function 'notmuch)) ;;; personal emails and others (defvar jao-mails) -(defvar jao-extra-mails) +(defvar jao-extra-mails nil) (defvar jao-mails-regexp (regexp-opt jao-mails)) - +(defvar jao-maildir (jao-d-l "~/Mail" "~/var/mail")) ;;; gnus (setq gnus-init-file "~/.emacs.d/gnus.el" gnus-home-directory "~/.emacs.d/gnus" @@ -21,7 +20,7 @@ message-directory (expand-file-name "Mail" gnus-home-directory) mail-source-directory (expand-file-name "Mail" gnus-home-directory)) ;;; proton -(use-package jao-proton-utils) +(jao-when-linux (use-package jao-proton-utils)) ;;; message mode ;;;; customization @@ -180,7 +179,7 @@ (when (require 'randomsig nil t) (define-key message-mode-map (kbd "C-c s") 'randomsig-replace-sig) (define-key message-mode-map (kbd "C-c S") 'randomsig-select-sig) - (setq randomsig-dir (expand-file-name "~/etc/config/emacs")) + (setq randomsig-dir gnus-home-directory) (setq randomsig-files '("signatures.txt")) ;; or (setq randomsig-files (randomsig-search-sigfiles)) ;; or (setq randomsig-files 'randomsig-search-sigfiles) @@ -210,16 +209,21 @@ (setq smtpmail-smtp-service 587)) (defun jao-sendmail-local () - (setq send-mail-function 'sendmail-send-it) + (setq send-mail-function 'smtpmail-send-it) ;; send-mail-function + ;; (setq sendmail-program "/usr/sbin/sendmail") (setq smtpmail-auth-supported nil) ;; (cram-md5 plain login) (setq smtpmail-servers-requiring-authorization nil) (setq smtpmail-smtp-user nil) (setq smtpmail-smtp-server "127.0.0.1") (setq smtpmail-smtp-service 25)) +(defun jao-sendmail-send-it () + (with-temp-message "Sending email..." + (sendmail-send-it))) + (defun jao-sendmail-msmtp () (setq send-mail-function 'sendmail-send-it - sendmail-program "/usr/bin/msmtp" + sendmail-program (executable-find "msmtp") mail-specify-envelope-from t message-sendmail-envelope-from 'header mail-envelope-from 'header)) @@ -232,6 +236,7 @@ :ensure t :init (setq bbdb-complete-name-allow-cycling t bbdb-completion-display-record nil + bbdb-dedicated-window t bbdb-gui t bbdb-message-all-addresses t bbdb-complete-mail-allow-cycling t @@ -262,6 +267,18 @@ ("Cc" . ,jao-mails-regexp) ("BCc" . ,jao-mails-regexp)) bbdb-ignore-message-alist bbdb-auto-notes-ignore-messages) + + (setq bbdb-layout-alist + '((one-line (order phone mail-alias mail notes) + (name-end . 24) + (toggle . t)) + (multi-line (omit uuid creation-date timestamp name-format name-face) + (toggle . t) + (indentation . 4)) + (pop-up-multi-line + (omit uuid creation-date timestamp name-format name-face) + (indentation . 4)) + (full-multi-line (indentation . 4)))) :config (add-hook 'message-setup-hook 'bbdb-mail-aliases) ;; (add-hook 'bbdb-notice-mail-hook 'bbdb-auto-notes) |
