Advertisement
Guest User

Untitled

a guest
Jun 4th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. ;; default mail folder
  2. (setq mu4e-maildir "~/Mail")
  3.  
  4. (require 'smtpmail)
  5. (setq message-send-mail-function 'smtpmail-send-it
  6. smtpmail-stream-type 'starttls
  7. smtpmail-default-smtp-server "smtp.gmail.com"
  8. smtpmail-smtp-server "smtp.gmail.com"
  9. smtpmail-smtp-service 587)
  10.  
  11. ;; hide duplicates of messages
  12. (setq mu4e-headers-skip-duplicates t)
  13.  
  14. (setq mu4e-contexts
  15. `( ,(make-mu4e-context
  16. :name "Personal"
  17. :enter-func (lambda () (mu4e-message "Switch to the Personal context"))
  18. ;; leave-func not defined
  19. :match-func (lambda (msg)
  20. (when msg
  21. (mu4e-message-contact-field-matches msg
  22. :to "personal@gmail.com")))
  23. :vars '( ( user-mail-address . "personal@gmail.com" )
  24. ( user-full-name . "Name" )
  25. ( mu4e-compose-signature .
  26. (concat
  27. "Namen"))))
  28. ,(make-mu4e-context
  29. :name "Work"
  30. :enter-func (lambda () (mu4e-message "Switch to the Work context"))
  31. ;; leave-fun not defined
  32. :match-func (lambda (msg)
  33. (when msg
  34. (mu4e-message-contact-field-matches msg
  35. :to "work@gmail.com")))
  36. :vars '( ( user-mail-address . "work@gmail.com" )
  37. ( user-full-name . "Name" )
  38. ( mu4e-compose-signature .
  39. (concat
  40. "Namen"))))))
  41.  
  42. ;; pick Personal context as first
  43. (setq mu4e-context-policy 'pick-first)
  44. ;; always ask for context when starting to compose message
  45. (setq mu4e-compose-context-policy 'ask)
  46. ;; make adresses next to names visible
  47. (setq mu4e-view-show-addresses t)
  48.  
  49. (setq mu4e-drafts-folder
  50. (lambda (msg)
  51. ;; the 'and msg' is to handle the case where msg is nil
  52. (if (and msg
  53. (mu4e-message-contact-field-matches msg :from "personal@gmail.com"))
  54. "/Personal/[Gmail].Draft"
  55. "/Work/[Gmail].Draft")))
  56.  
  57. (setq mu4e-sent-folder
  58. (lambda (msg)
  59. ;; the 'and msg' is to handle the case where msg is nil
  60. (if (and msg
  61. (mu4e-message-contact-field-matches msg :from "personal@gmail.com"))
  62. "/Personal/[Gmail].Sent"
  63. "/Work/[Gmail].Sent")))
  64.  
  65. (setq mu4e-trash-folder
  66. (lambda (msg)
  67. ;; the 'and msg' is to handle the case where msg is nil
  68. (if (and msg
  69. (mu4e-message-contact-field-matches msg :to "personal@gmail.com"))
  70. "/Personal/[Gmail].Trash"
  71. "/Work/[Gmail].Trash")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement