Skip to content

A project to read emails from Gmail using Gmail Oauth2.0 APIs. It can be used for Email Automation.

Notifications You must be signed in to change notification settings

tiwariswapnil/gmail-api-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

GoogleGmailAPI

A project to read emails from Gmail using Gmail Oauth2.0 APIs. It can be used for Email Automation.

Prerequisites

  1. Enable Gmail API for your account - Refer to link
  2. Create OAuth credentials for your project - Refer to link

Select Desktop App as the Application type for creating the credentials-

Credentials-DesktopApp


  1. Download the credentials json file

DownloadCredentials


  1. And place it in your src/test/resources folder

Refer to https://developers.google.com/gmail/api/quickstart/java for the code.

Tests Execution

  • After cloning the project, compile using the IDE Maven plugin or mvn clean compile
  • Tests can be run by any of following ways:
    • Command line using mvn clean test from project root directory
    • Run (green play) button in Test class - /src/test/java/com/github/emailautomation/test/EmailTest.java

About

A project to read emails from Gmail using Gmail Oauth2.0 APIs. It can be used for Email Automation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages