Hi everyone!
I'm trying to send an email when a button is pressed.
All the functions needed to create the HTTP client, get the OAuth2 credentials (either with gmail.storage or flow), build the message, and send the email are defined in a python script called email_oauth2.py
Here are the imports of email_oauth2.py
import base64
import httplib2
import argparse
from email.mime.text import MIMEText
from apiclient import discovery
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client import tools
In main.py I simply do:
email_oauth2.set_and_send(my_message='my message here')
I'm using buildozer, and it doesn't complain when packaging the APK. I included these requirements in buildozer.spec (I could't include base64).
requirements = kivy,datetime,numpy,google-api-python-client,httplib2,argparse,oauth2client,email
The APK also needs a client_secret.json (and I guess the mail.storage file?) but they are in the app root folder, and they are included in buildozer.spec as well.
I really don't understand what else is missing...