Python scripts to send email using Gmail API which helps you to save cost and time on your email campaign and have a higher chance of landing email into inbox.
Python 2.7.14
pip 9.0.3
pip install httplib2
pip install oauth2client
pip install apiclient
pip install --upgrade google-api-python-client
pip install --upgrade python-gflags
1. You need a google account - either google apps or gmail. So, if you haven't got one, go get one.
2. Get yourself to the [developers console](https://console.developers.google.com)
3. Create a new project, and wait few seconds for that to complete.
4. Navigate to API's and Auth -> Credentials
5. Under OAuth select Create New Client ID
6. Choose Installed Application as the application type **Other**
7. You should now have a button Download JSON. Do that. It's your client_secret.json—the passwords so to speak
8. copy downloaded client_secret.json into credentials.json
python send-email.py --noauth_local_webserver
Below one is just a demo please go through the link given in your console
Enter verfication code:
Please copy the link and enter in the browser then allow your Gmail account to give access to your application
And then copy the verification code into console then click enter your email will be sent and
It creates a gmail.storage file in your project directory which will have a token to send text emails without verification code.
-
Ravishankar S R - Full stack developer - ravishankarsr.rav@gmail.com
MIT.