From 682e5621cf0dd3904353f92810c021e8421d9684 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 11 Nov 2020 00:24:32 -0500 Subject: [PATCH] ENH make oauth work with multiple accounts --- etc/conf.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/conf.org b/etc/conf.org index f3f02a0..ea9f938 100644 --- a/etc/conf.org +++ b/etc/conf.org @@ -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))) (defun nd/xoauth2-get-secrets (host user port) - (when (and (string= host "smtp.office365.com") - (string= user "ndwarshuis3@gatech.edu") - (string= port "587")) + (when + (or (and (string= host "smtp.office365.com") + (string= user "ndwarshuis3@gatech.edu") + (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) :client-id (nd/lookup-oauth-secret "client_id" user) :client-secret (nd/lookup-oauth-secret "client_secret" user)