lib 1400087 // gimap import com.google.code.javax.mail.*; import com.google.code.javax.mail.internet.*; import com.google.code.com.sun.mail.imap.*; static Folder googleCode_gmailDefaultFolder() { ret googleCode_gmailDefaultFolder(gmailDefaultUser()); } static Folder googleCode_gmailDefaultFolder(S user) { ret googleCode_gmailDefaultFolder(user, findGMailPassword(user)); } static Folder googleCode_gmailDefaultFolder(S user, S pass) ctex { new Properties props; props.setProperty("mail.store.protocol", "imaps"); Session session = Session.getInstance(props, null); URLName urlName = new URLName("imap.gmail.com"); IMAPSSLStore store = new IMAPSSLStore(session, urlName); store.connect("imap.gmail.com", user, pass); ret store.getDefaultFolder(); }