-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mu4e.el
80 lines (65 loc) · 2.42 KB
/
.mu4e.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(require 'mu4e)
;; default
(setq mu4e-maildir "~/muttMail")
(setq mu4e-drafts-folder "/[Gmail].Drafts")
(setq mu4e-sent-folder "/[Gmail].Sent Mail")
(setq mu4e-trash-folder "/[Gmail].Trash")
;; don't save message to Sent Messages, Gmail/IMAP takes care of this
(setq mu4e-sent-messages-behavior 'delete)
;; setup some handy shortcuts
;; you can quickly switch to your Inbox -- press ``ji''
;; then, when you want archive some messages, move them to
;; the 'All Mail' folder by pressing ``ma''.
(setq mu4e-maildir-shortcuts
'( ("/inbox" . ?i)
("/[Gmail].Sent Mail" . ?s)
("/[Gmail].Trash" . ?t)
("/[Gmail].All Mail" . ?a)))
;; allow for updating mail using 'U' in the main view:
(setq mu4e-get-mail-command "getmail"
mu4e-update-interval 600) ;; update every 10 minutes
;; something about ourselves
(setq
user-mail-address "tonghuix@gmail.com"
user-full-name "Tong Hui"
message-signature
(concat
"Tong Hui\n"
"Email: tonghuix@gmail.com\n"
"\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
;;(require 'smtpmail)
;; (setq message-send-mail-function 'smtpmail-send-it
;; starttls-use-gnutls t
;; smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
;; smtpmail-auth-credentials
;; '(("smtp.gmail.com" 587 "renws1990@gmail.com" nil))
;; smtpmail-default-smtp-server "smtp.gmail.com"
;; smtpmail-smtp-server "smtp.gmail.com"
;; smtpmail-smtp-service 587)
;; alternatively, for emacs-24 you can use:
;;(setq message-send-mail-function 'smtpmail-send-it
;; smtpmail-stream-type 'starttls
;; smtpmail-default-smtp-server "smtp.gmail.com"
;; smtpmail-smtp-server "smtp.gmail.com"
;; smtpmail-smtp-service 587)
;; don't keep message buffers around
(setq message-kill-buffer-on-exit t)
;; Try to display images in mu4e
(setq
mu4e-view-show-images t
mu4e-view-image-max-width 800)
;; sending mail
(setq message-send-mail-function 'message-send-mail-with-sendmail
sendmail-program "msmtp"
user-full-name "Tong Hui")
(setq mu4e-confirm-quit nil
mu4e-headers-date-format "%d/%b/%Y %H:%M" ; date format
mu4e-html2text-command "html2text -utf8 -width 72"
)
(add-hook 'message-send-hook
(lambda ()
(unless (yes-or-no-p "Sure you want to send this?")
(signal 'quit nil))))