1

I am creating a java app for Google admin tasks and have successfully accessed a few bits using various Google APIs. However I am having trouble with the "Google Apps Email Settings API"

The sample code given for Java shows the import as:-

import sample.appsforyourdomain.gmailsettings.GmailSettingsService; 

which I can't seem to find in the gdata libraries. Closest I can get is:-

import com.google.gdata.client.appsforyourdomain.gmailsettings.GmailFilterService; 

But with this when I am trying to create the GmailSettingsService as per the sample code:-

GmailSettingsService service = new GmailSettingsService....

it is not found. Please help, I am sure it's something simple/stupid I have missed!

Thanks Phil

Philip Mc
  • 11
  • 2
  • you want to send email using gmail id ?...or? – Aniket Apr 06 '15 at 12:16
  • The first thing I was trying to get it to do was to display a list of delegates for a particular mailbox - sample code was given as:- import sample.appsforyourdomain.gmailsettings.GmailSettingsService; ... GmailSettingsService service = new GmailSettingsService("your-apps", "example.com", "adminUsername", "adminPassword"); service.retrieveEmailDelegates("user"); – Philip Mc Apr 06 '15 at 13:20
  • Check this documentation, it may help: https://code.google.com/p/gdata-java-client/source/browse/trunk/java/sample/appsforyourdomain/gmailsettings/GmailSettingsService.java?r=499 – Gerardo Apr 06 '15 at 18:27

1 Answers1

1

You should download servlet-api-2.4.jar (included in Sun's Servlet API - version 2.3 or greater), mail.jar (included in Sun's JavaMail API - version 1.4 or greater) and activation.jar (included in Sun's JavaBeans Activation Framework).

Then update build.properties file (in /gdata-client-java-master/java/build-samples/) with proper path values pointed to that jars. Then run command "ant -f build-samples.xml sample.appsforyourdomain.run" from /gdata-client-java-master/java.

If operation completed successfully AppsForYourDomainClient.jar will be available in /gdata-client-java-master/java/sample/appsforyourdomain/lib/. After adding this jar to your classpath you will be able to use GmailSettingsService.

gugus
  • 17
  • 8