[emacs] Guard email config with conditionals

This commit is contained in:
Correl Roush 2023-09-28 10:27:21 -04:00
parent 1fb532801a
commit 5937c5b1c4

View file

@ -1147,25 +1147,30 @@ Configure MU4E to read email synced from my personal and work accounts.
(setq mu4e-maildir "~/Mail") (setq mu4e-maildir "~/Mail")
(setq user-full-name "Correl Roush") (setq user-full-name "Correl Roush")
(setq mu4e-contexts (setq mu4e-contexts nil)
(list (make-mu4e-context (when (f-exists?
:name "work" (f-join mu4e-maildir "Work"))
:vars `((user-mail-address . "correlr@aweber.com") (add-to-list
(mu4e-drafts-folder . "/Work/[Gmail]/Drafts") 'mu4e-contexts
(mu4e-sent-folder . "/Work/[Gmail]/Sent Mail") (make-mu4e-context
(mu4e-trash-folder . "/Work/[Gmail]/Trash") :name "work"
(mu4e-maildir-shortcuts . (("/Work/INBOX" . ?i) :vars `((user-mail-address . "correlr@aweber.com")
("/Work/[Gmail]/All Mail" . ?a) (mu4e-drafts-folder . "/Work/[Gmail]/Drafts")
("/Work/[Gmail]/Starred" . ?S) (mu4e-sent-folder . "/Work/[Gmail]/Sent Mail")
("/Work/[Gmail]/Sent Mail" . ?s) (mu4e-trash-folder . "/Work/[Gmail]/Trash")
("/Work/[Gmail]/Trash" . ?t))) (mu4e-maildir-shortcuts . (("/Work/INBOX" . ?i)
(mu4e-compose-signature . ,(with-temp-buffer ("/Work/[Gmail]/All Mail" . ?a)
(insert-file-contents "~/.signature-aweber") ("/Work/[Gmail]/Starred" . ?S)
(buffer-string))) ("/Work/[Gmail]/Sent Mail" . ?s)
(smtpmail-smtp-user . "correlr@aweber.com") ("/Work/[Gmail]/Trash" . ?t)))
(smtpmail-smtp-server . "smtp.gmail.com") (mu4e-compose-signature . ,(with-temp-buffer
(smtpmail-smtp-service . 465) (when (f-exists? "~/.signature-aweber")
(smtpmail-stream-type . ssl))))) (insert-file-contents "~/.signature-aweber"))
(buffer-string)))
(smtpmail-smtp-user . "correlr@aweber.com")
(smtpmail-smtp-server . "smtp.gmail.com")
(smtpmail-smtp-service . 465)
(smtpmail-stream-type . ssl)))))
(when (f-exists? (when (f-exists?
(f-join mu4e-maildir "Personal")) (f-join mu4e-maildir "Personal"))
(add-to-list (add-to-list
@ -1182,7 +1187,8 @@ Configure MU4E to read email synced from my personal and work accounts.
("/Personal/[Gmail]/Sent Mail" . ?s) ("/Personal/[Gmail]/Sent Mail" . ?s)
("/Personal/[Gmail]/Trash" . ?t))) ("/Personal/[Gmail]/Trash" . ?t)))
(mu4e-compose-signature . ,(with-temp-buffer (mu4e-compose-signature . ,(with-temp-buffer
(insert-file-contents "~/.signature") (when (f-exists? "~/.signature")
(insert-file-contents "~/.signature"))
(buffer-string))) (buffer-string)))
(smtpmail-smtp-user . "correl@gmail.com") (smtpmail-smtp-user . "correl@gmail.com")
(smtpmail-smtp-server . "smtp.gmail.com") (smtpmail-smtp-server . "smtp.gmail.com")