ContactList 用于获取用户的msn和邮箱联系人列表,支持的邮箱包括hotmail, gmail, yahoo, sohu, sina, 163, 126, tom, yeah, 189和139。
示例代码:
try { ContactsImporter importer = ContactsImporterFactory.getHotmailContacts(username, password); List contacts = importer.getContacts(); for (Contact contact : contacts) { System.out.println(contact.getUsername() + ": " + contact.getEmail()); } } catch (ContactsException ex) { ex.printStackTrace(); }