How to access Gmail programatically?

We want to have a Notes database go to a specific gmail account to read emails there (and possibly mark them as read) in order to import the email information into the database. Is this possible, and if so, how?

Subject: You can use the JavaMail API.

I think the packages are already there when you install the Notes 8 client. Here’s a link to the doco from Sun on this API with specific reference to GMail → JavaMail API - FAQ

Subject: The type Session is ambiguous

Thank you very much, this looks very helpful.

One problem, though (and I’m new to Java in Notes, so please bear with me): When I import javax.mail.* and javax.mail.internet.* , the “Session session = getSession();” line gives me a “The type Session is ambiguous” error. Any ideas on how to resolve?

Subject: Got it working

Removed the “*” and imported specific classes.