Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; default mail folder
- (setq mu4e-maildir "~/Mail")
- (require 'smtpmail)
- (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)
- ;; hide duplicates of messages
- (setq mu4e-headers-skip-duplicates t)
- (setq mu4e-contexts
- `( ,(make-mu4e-context
- :name "Personal"
- :enter-func (lambda () (mu4e-message "Switch to the Personal context"))
- ;; leave-func not defined
- :match-func (lambda (msg)
- (when msg
- (mu4e-message-contact-field-matches msg
- :to "personal@gmail.com")))
- :vars '( ( user-mail-address . "personal@gmail.com" )
- ( user-full-name . "Name" )
- ( mu4e-compose-signature .
- (concat
- "Namen"))))
- ,(make-mu4e-context
- :name "Work"
- :enter-func (lambda () (mu4e-message "Switch to the Work context"))
- ;; leave-fun not defined
- :match-func (lambda (msg)
- (when msg
- (mu4e-message-contact-field-matches msg
- :to "work@gmail.com")))
- :vars '( ( user-mail-address . "work@gmail.com" )
- ( user-full-name . "Name" )
- ( mu4e-compose-signature .
- (concat
- "Namen"))))))
- ;; pick Personal context as first
- (setq mu4e-context-policy 'pick-first)
- ;; always ask for context when starting to compose message
- (setq mu4e-compose-context-policy 'ask)
- ;; make adresses next to names visible
- (setq mu4e-view-show-addresses t)
- (setq mu4e-drafts-folder
- (lambda (msg)
- ;; the 'and msg' is to handle the case where msg is nil
- (if (and msg
- (mu4e-message-contact-field-matches msg :from "personal@gmail.com"))
- "/Personal/[Gmail].Draft"
- "/Work/[Gmail].Draft")))
- (setq mu4e-sent-folder
- (lambda (msg)
- ;; the 'and msg' is to handle the case where msg is nil
- (if (and msg
- (mu4e-message-contact-field-matches msg :from "personal@gmail.com"))
- "/Personal/[Gmail].Sent"
- "/Work/[Gmail].Sent")))
- (setq mu4e-trash-folder
- (lambda (msg)
- ;; the 'and msg' is to handle the case where msg is nil
- (if (and msg
- (mu4e-message-contact-field-matches msg :to "personal@gmail.com"))
- "/Personal/[Gmail].Trash"
- "/Work/[Gmail].Trash")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement