summaryrefslogtreecommitdiff
path: root/mail.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-08-30 21:05:52 +0800
committerJSDurand <mmemmew@gmail.com>2022-08-30 21:05:52 +0800
commit236967bfc5cc3f10842d16ccd3f238e61287b652 (patch)
treea2416ae805ff78dbdcd08fe0e62067b44914fa67 /mail.el
parentb850248265cb3065af8780541833f3dbf5f8eb07 (diff)
mail: try to make mu4e work
Diffstat (limited to 'mail.el')
-rw-r--r--mail.el131
1 files changed, 67 insertions, 64 deletions
diff --git a/mail.el b/mail.el
index a99a4bf..e238fb2 100644
--- a/mail.el
+++ b/mail.el
@@ -43,71 +43,74 @@
:query "date:7d..now AND maildir:/suivis"
:key ?s))
- (setq mu4e-maildir-shortcuts
- '(("/INBOX" . ?i)
- ("/archive" . ?a)
- ("/suivis" . ?s)
- ("/drafts" . ?d)))
+ ;; (setq mu4e-maildir-shortcuts
+ ;; '(("/INBOX" . ?i)
+ ;; ("/archive" . ?a)
+ ;; ("/suivis" . ?s)
+ ;; ("/drafts" . ?d)))
+
+ (setq mu4e-sent-folder "/mymail/Sent")
- (setq mu4e-contexts
- (list
- (make-mu4e-context
- :name "Student"
- :enter-func (lambda () (mu4e-message "Entering Student context"))
- :leave-func (lambda () (mu4e-message "Leaving Student context"))
- ;; we match based on the contact-fields of the message
- :match-func
- (lambda (msg)
- (when msg
- (or
- (mu4e-message-contact-field-matches msg :from "tan\\|mlh\\|hsialc\\|tingyu.lee\\|tingyulee")
- (mu4e-message-contact-field-matches msg :to "tan\\|mlh\\|hsialc\\|tingyu.lee\\|tingyulee"))))
- :vars '((user-mail-address . "mmemmew@gmail.com")
- (user-full-name . "李俊緯")
- (mu4e-compose-signature . "生 俊緯")
- (mu4e-sent-folder . "/gmail/sent")
- (smtpmail-smtp-user . "mmemmew@gmail.com")
- (smtpmail-local-domain . "gmail.com")
- (smtpmail-default-smtp-server . "smtp.gmail.com")
- (smtpmail-smtp-server . "smtp.gmail.com")
- (smtpmail-smtp-service . 587)))
- (make-mu4e-context
- :name "NCTS"
- :enter-func (lambda () (mu4e-message "Switch to the NCTS context"))
- :leave-func (lambda () (mu4e-message "Leave NCTS context"))
- ;; no leave-func
- ;; we match based on the maildir of the message
- ;; this matches maildir /Arkham and its sub-directories
- :match-func (lambda (msg)
- (when msg
- (or
- (mu4e-message-contact-field-matches msg :to "chunweilee@ncts.ntu.edu.tw")
- (mu4e-message-contact-field-matches msg :from "chunweilee@ncts.ntu.edu.tw"))))
- :vars '((user-mail-address . "chunweilee@ncts.ntu.edu.tw")
- (user-full-name . "李俊緯")
- (mu4e-compose-signature .
- (concat
- "Sincerely Yours,\n"
- "俊緯"))))
- (make-mu4e-context
- :name "Durand"
- :enter-func (lambda () (mu4e-message "Entering Durand context"))
- :leave-func (lambda () (mu4e-message "Leaving Durand context"))
- ;; we match based on the contact-fields of the message
- :match-func (lambda (msg)
- (when msg
- (or
- (mu4e-message-contact-field-matches msg :to "mmemmew@gmail.com")
- (mu4e-message-contact-field-matches msg :from "mmemmew@gmail.com"))))
- :vars '((user-mail-address . "durand@jsdurand.xyz")
- (user-full-name . "Durand")
- (mu4e-compose-signature . "Sévère Durand")
- (mu4e-sent-folder . "/gmail/sent")
- (smtpmail-smtp-user . "mmemmew@gmail.com")
- (smtpmail-local-domain . "gmail.com")
- (smtpmail-default-smtp-server . "smtp.gmail.com")
- (smtpmail-smtp-server . "smtp.gmail.com")
- (smtpmail-smtp-service . 587))))))
+ ;; (setq mu4e-contexts
+ ;; (list
+ ;; (make-mu4e-context
+ ;; :name "Student"
+ ;; :enter-func (lambda () (mu4e-message "Entering Student context"))
+ ;; :leave-func (lambda () (mu4e-message "Leaving Student context"))
+ ;; ;; we match based on the contact-fields of the message
+ ;; :match-func
+ ;; (lambda (msg)
+ ;; (when msg
+ ;; (or
+ ;; (mu4e-message-contact-field-matches msg :from "tan\\|mlh\\|hsialc\\|tingyu.lee\\|tingyulee")
+ ;; (mu4e-message-contact-field-matches msg :to "tan\\|mlh\\|hsialc\\|tingyu.lee\\|tingyulee"))))
+ ;; :vars '((user-mail-address . "mmemmew@gmail.com")
+ ;; (user-full-name . "李俊緯")
+ ;; (mu4e-compose-signature . "生 俊緯")
+ ;; (mu4e-sent-folder . "/gmail/sent")
+ ;; (smtpmail-smtp-user . "mmemmew@gmail.com")
+ ;; (smtpmail-local-domain . "gmail.com")
+ ;; (smtpmail-default-smtp-server . "smtp.gmail.com")
+ ;; (smtpmail-smtp-server . "smtp.gmail.com")
+ ;; (smtpmail-smtp-service . 587)))
+ ;; (make-mu4e-context
+ ;; :name "NCTS"
+ ;; :enter-func (lambda () (mu4e-message "Switch to the NCTS context"))
+ ;; :leave-func (lambda () (mu4e-message "Leave NCTS context"))
+ ;; ;; no leave-func
+ ;; ;; we match based on the maildir of the message
+ ;; ;; this matches maildir /Arkham and its sub-directories
+ ;; :match-func (lambda (msg)
+ ;; (when msg
+ ;; (or
+ ;; (mu4e-message-contact-field-matches msg :to "chunweilee@ncts.ntu.edu.tw")
+ ;; (mu4e-message-contact-field-matches msg :from "chunweilee@ncts.ntu.edu.tw"))))
+ ;; :vars '((user-mail-address . "chunweilee@ncts.ntu.edu.tw")
+ ;; (user-full-name . "李俊緯")
+ ;; (mu4e-compose-signature .
+ ;; (concat
+ ;; "Sincerely Yours,\n"
+ ;; "俊緯"))))
+ ;; (make-mu4e-context
+ ;; :name "Durand"
+ ;; :enter-func (lambda () (mu4e-message "Entering Durand context"))
+ ;; :leave-func (lambda () (mu4e-message "Leaving Durand context"))
+ ;; ;; we match based on the contact-fields of the message
+ ;; :match-func (lambda (msg)
+ ;; (when msg
+ ;; (or
+ ;; (mu4e-message-contact-field-matches msg :to "mmemmew@gmail.com")
+ ;; (mu4e-message-contact-field-matches msg :from "mmemmew@gmail.com"))))
+ ;; :vars '((user-mail-address . "durand@jsdurand.xyz")
+ ;; (user-full-name . "Durand")
+ ;; (mu4e-compose-signature . "Sévère Durand")
+ ;; (mu4e-sent-folder . "/gmail/sent")
+ ;; (smtpmail-smtp-user . "mmemmew@gmail.com")
+ ;; (smtpmail-local-domain . "gmail.com")
+ ;; (smtpmail-default-smtp-server . "smtp.gmail.com")
+ ;; (smtpmail-smtp-server . "smtp.gmail.com")
+ ;; (smtpmail-smtp-service . 587)))))
+ )
;; (setq smtpmail-debug-info t)
;; (setq smtpmail-debug-verb t)