pip install -r requirements.txt
Create following files in the same directory with main.py
touch credentials.json
touch client_id.json
touch contacts.txt
touch content.json
- Follow instructions in here to get app password.
- Change email and app password in credentials.json
{
"email": "<your email>",
"app_password": "<your app password>"
}
- Follow instructions in here to OAuth2 credentials.
- Paste all information of json file you downloaded into client_id.json
Config your subject and file id in content.json
{
"subject": "<your subject>",
"file_id": "<your file id>"
}
Write your user email(s) in contacts.txt in the same directory with main.py
john [email protected]
marry [email protected]
To send google doc file as a content to email
python main.py
Note: You may be login for fisrt time to get app code