.emacs.d

My Emacs configuration files.
Log | Files | Refs | README

commit 1145b635cadd528f30fe194e328290b8e6c8534d
parent e3a57e27a6c6ef2d36d967841e88451c494b1fb7
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Mon, 13 Mar 2017 08:40:03 -0400

Setup email with mu4e.

Diffstat:
Mlisp/setup-email.el | 49++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 46 insertions(+), 3 deletions(-)

diff --git a/lisp/setup-email.el b/lisp/setup-email.el @@ -1,9 +1,52 @@ ;; EMAIL SETUP FILE +(require 'mu4e) -;; OfflineImap mode -(require 'offlineimap) +;; default +(setq mu4e-maildir (expand-file-name "~/Maildir")) -(add-hook 'gnus-before-startup-hook 'offlineimap) +(setq mu4e-drafts-folder "/Drafts") +(setq mu4e-sent-folder "/Sent") +(setq mu4e-trash-folder "/Trash") + +;; don't save message to Sent Messages, GMail/IMAP will take care of this +(setq mu4e-sent-messages-behavior 'delete) + +;; setup some handy shortcuts +(setq mu4e-maildir-shortcuts + '(("/INBOX" . ?i) + ("/Sent" . ?s) + ("/Trash" . ?t))) + +;; allow for updating mail using 'U' in the main view: +(setq mu4e-get-mail-command "offlineimap") + +;; something about ourselves +;; I don't use a signature... +(setq + user-mail-address "hugo@soucy.cc" + user-full-name "Hugo Soucy" + ;; message-signature + ;; (concat + ;; "Foo X. Bar\n" + ;; "http://www.example.com\n") +) + +;; sending mail -- replace USERNAME with your gmail username +;; also, make sure the gnutls command line utils are installed +;; package 'gnutls-bin' in Debian/Ubuntu, 'gnutls' in Archlinux. + +(require 'smtpmail) + +(setq message-send-mail-function 'smtpmail-send-it + starttls-use-gnutls t + smtpmail-starttls-credentials + '(("soucy.cc" 587 nil nil)) + smtpmail-auth-credentials + (expand-file-name "~/.authinfo.gpg") + smtpmail-default-smtp-server "soucy.cc" + smtpmail-smtp-server "soucy.cc" + smtpmail-smtp-service 587 + smtpmail-debug-info t) (provide 'setup-email)