0

I'm using the latest Spacemacs develop branch (updated this morning) and I think that the latest package updates might have broken something? I had just set up mu4e yesterday, and finally got contexts working. After updating, contexts no longer work. However, since it was only a matter of an hour or so after I had set it up and got it working, I thought maybe something was wrong with my configuration. So, I'm looking for anyone to please quickly review my whole mu4e setup (posted below) to see if I have made any errors (this is entirely possible as I'm still new). Please note that other than contexts, it does download and read mail flawlessly so far (except for trashing mails, but that's a gmail thing I've read about).

Thanks for any help!

  ;; ;; mu4e Setup
  (setq mu4e-maildir "~/Mail"
        mu4e-get-mail-command "offlineimap"
        mu4e-update-interval nil
        mu4e-compose-signature-auto-include nil
        mu4e-view-show-images t
        mu4e-view-show-addresses t)
  (setq message-send-mail-function 'smtpmail-send-it)

  (setq smtpmail-stream-type 'starttls)
  (setq smtpmail-default-smtp-server "smtp.gmail.com")
  (setq smtpmail-smtp-server "smtp.gmail.com")
  (setq smtpmail-smtp-service 587)
  (mu4e-mail-account-reset)

  (setq message-send-mail-function 'smtpmail-send-it
        smtpmail-default-smtp-server "smtp.gmail.com")

  ;; Begin mu4e Configuration

  (require 'mu4e-context)
  (setq mu4e-contexts
        `( ,(make-mu4e-context
             :name "Personal1 Gmail"
             ;; we match based on the contact-fields of the message
               :match-func (lambda (msg)
                                 (when msg
                                   (mu4e-message-contact-field-matches msg
                                                                       :to "personal1@gmail.com")))
             :vars '(
                     (user-full-name . "Personal Name1")
                     (user-mail-address . "personal1@gmail.com")
                     ( mu4e-compose-signature .
                                                  (concat
                                                   "Personal Name\n"
                                                   "Paris, France\n"
                                               "personal1@gmail.com\n"))
                     (mu4e-sent-folder . "/Personal1/[Gmail Personal1].Sent Mail")
                     (mu4e-drafts-folder . "/Personal1/[Gmail Personal1].Drafts")
                     (mu4e-trash-folder . "/Personal1/[Gmail Personal1].Trash")
                     (mu4e-refile-folder . "/Personal1/[Gmail Personal1].Archive")
                     (smtpmail-mail-address . "personal1@gmail.com")
                     (smtpmail-smtp-user . "personal1@gmail.com")
                     (smtpmail-auth-credentials
                      (expand-file-name "~/.authinfo.gpg"))
                     ))

           ,(make-mu4e-context
             :name "Personal2 Gmail"
             ;; we match based on the contact-fields of the message
               :match-func (lambda (msg)
                                 (when msg
                                   (mu4e-message-contact-field-matches msg
                                                                 :to "personal2@gmail.com")))
             :vars '(
                     (user-full-name . "Personal Name2")
                     (user-mail-address . "personal2@gmail.com")
                     ( mu4e-compose-signature .
                                                  (concat
                                                   "Personal Name2\n"
                                                   "Paris, France\n"
                                               "personal2@gmail.com\n"))

                     (mu4e-sent-folder . "/Personal2/[Gmail Personal2].Sent Mail")
                     (mu4e-drafts-folder . "/Personal2/[Gmail Personal2].Drafts")
                     (mu4e-trash-folder . "/Personal2/[Gmail Personal2].Trash")
                     (mu4e-refile-folder . "/Personal2/[Gmail Personal2].Archive")
                     (smtpmail-mail-address . "personal2@gmail.com")
                     (smtpmail-smtp-user . "personal2@gmail.com")
                     (smtpmail-auth-credentials
                      (expand-file-name "~/.authinfo.gpg"))

                     ))


           ,(make-mu4e-context
             :name "Public Email Gmail"
             ;; we match based on the contact-fields of the message
               :match-func (lambda (msg)
                                 (when msg
                                   (mu4e-message-contact-field-matches msg
                                                                 :to "publicemail@gmail.com")))
             :vars '(
                     (user-full-name . "Public Email")
                     (user-mail-address . "publicemail@gmail.com")
                     ( mu4e-compose-signature .
                                                  (concat
                                                   "Public Email\n"
                                                   "Somewhere in the world\n"
                                               "publicemail@gmail.com\n"))

                     (mu4e-sent-folder . "/Public/[Gmail Public].Sent Mail")
                     (mu4e-drafts-folder . "/Public/[Gmail Public].Drafts")
                     (mu4e-trash-folder . "/Public/[Gmail Public].Trash")
                     (mu4e-refile-folder . "/Public/[Gmail Public].Archive")
                     (smtpmail-mail-address . "publicemail@gmail.com")
                     (smtpmail-smtp-user . "publicemail@gmail.com")
                     (smtpmail-auth-credentials
                      (expand-file-name "~/.authinfo.gpg"))

                     ))

;; End mu4e Contexts Configuration
  • Asking questions along the lines of "latest package updates might have broken something" without software versions is unlikely to get you anywhere. Moreover, this seems like a material for issue tracker rather than generic question. – god Apr 12 at 7:38
0

I figured it out and I thought that perhaps my information might help others in the future.

The name for a context cannot include a space. If it does, it breaks. So if you have "account 1", it won't work. It has to be "account1". That literally fixed everything.

Here's hoping this helps some other person who couldn't figure it out. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.