aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/send_email.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/send_email.py b/python/send_email.py
index c036c315..f39fb5b1 100644
--- a/python/send_email.py
+++ b/python/send_email.py
@@ -13,7 +13,7 @@ import sys
import argparse
#flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
-SCOPES = 'https://www.googleapis.com/auth/gmail.compose'
+SCOPES = 'https://www.googleapis.com/auth/gmail.modify'
CLIENT_SECRET_FILE = 'secret.json'
APPLICATION_NAME = 'Swaptions'
@@ -37,7 +37,7 @@ def get_gmail_service():
if not credentials or credentials.invalid:
flow = client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES)
flow.user_agent = APPLICATION_NAME
- #credentials = tools.run_flow(flow, store, flags)
+ credentials = tools.run_flow(flow, store, flags)
print('Storing credentials to ' + credential_path)
service = build('gmail', 'v1', http=credentials.authorize(Http()))
return service