ENH make oauth work with multiple accounts
This commit is contained in:
parent
79957daf1c
commit
682e5621cf
|
@ -3710,9 +3710,13 @@ The following will only run if the =mu= command is found (which it won't be if t
|
||||||
(shell-command-to-string)))
|
(shell-command-to-string)))
|
||||||
|
|
||||||
(defun nd/xoauth2-get-secrets (host user port)
|
(defun nd/xoauth2-get-secrets (host user port)
|
||||||
(when (and (string= host "smtp.office365.com")
|
(when
|
||||||
|
(or (and (string= host "smtp.office365.com")
|
||||||
(string= user "ndwarshuis3@gatech.edu")
|
(string= user "ndwarshuis3@gatech.edu")
|
||||||
(string= port "587"))
|
(string= port "587"))
|
||||||
|
(and (string= host "smtp.gmail.com")
|
||||||
|
(string= user "natedwarshuis@gmail.com")
|
||||||
|
(string= port "587")))
|
||||||
(list :token-url (nd/lookup-oauth-secret "token_url" user)
|
(list :token-url (nd/lookup-oauth-secret "token_url" user)
|
||||||
:client-id (nd/lookup-oauth-secret "client_id" user)
|
:client-id (nd/lookup-oauth-secret "client_id" user)
|
||||||
:client-secret (nd/lookup-oauth-secret "client_secret" user)
|
:client-secret (nd/lookup-oauth-secret "client_secret" user)
|
||||||
|
|
Loading…
Reference in New Issue