Download a file from google drive and email them to recipients. Temporarily stores files under /tmp/gdrive
./gradlew clean build jar
You can use the same credentials.json file for email and google drive. Just so happens my use case required me to use a different email account.
###Parameters:
credentials1.json - credentials for the google drive account to search for
credentials2.json - credentials for the gmail account to use for email
recipients.json - people receiving the email
[email protected] - owner of the document in google drive
[email protected] - from email address
java -jar gdrive-forwarder-1.0.jar credentials1.json credentials2.json recipients.json [email protected] [email protected]
Go to https://console.cloud.google.com/apis/credentials and create an OAuth 2 Client ID and download the json.
{
"to": ["[email protected]", "[email protected]"]
}