!7 sclass LatestGMails extends DynTable { int numMsgs = 20; L calc() ctex { Folder inbox = gmail_inbox(); new L l; inbox.open(Folder.READ_ONLY); int count = inbox.getMessageCount(); int n = max(1, count-numMsgs+1); for (int i = count; i >= n; i--) { new Map map; //print("\nLoading message " + i + "\n"); Message msg = inbox.getMessage(i); map.put("From", InternetAddress.toString(msg.getFrom())); map.put("Subject", msg.getSubject()); //map.put("Message number: " + msg.getMessageNumber()); map.put("Sent/Received", msg.getSentDate() + "/" + msg.getReceivedDate()); //print(" Class: " + getClassName(msg)); //O content = msg.getContent(); //print(" Content type: " + getClassName(content)); map.put("Size", msg.getSize()); //print(" Content type: " + msg.getContentType()); l.add(map); } ret l; } }