【问题标题】:Retrieve the emails from a google contact group从 google 联系人组中检索电子邮件
【发布时间】:2014-03-28 12:27:57
【问题描述】:

我正在尝试从 google 用户的个人组中检索电子邮件。 我正在使用 Api Contacts V3,我可以检索指定用户的联系人和组(不是域组,使用 Admin api)。

我已阅读 API 并尝试了多种方法,但无法获取群组中不同成员的电子邮件。

我需要帮助。

非常感谢。

【问题讨论】:

    标签: java google-app-engine google-api google-contacts-api


    【解决方案1】:

    一旦您收到联系人,正如您所说的那样,您可以遍历每个联系人并提取电子邮件。这是取自the docs的一些示例代码:

    URL feedUrl = new URL("https://www.google.com/m8/feeds/contacts/default/full");
    ContactFeed resultFeed = myService.getFeed(feedUrl, ContactFeed.class);
    for (ContactEntry entry : resultFeed.getEntries()) {
        for (Email email : entry.getEmailAddresses()) {
            if (email.getPrimary()) {
                System.out.print(" " + email.getAddress());
                System.out.print("\n");
            }
        }
    }
    

    【讨论】:

    • 嗨!感谢您的答复。我也得到了没有问题的联系人和组。问题是检索这些组的成员。问候
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-26
    • 1970-01-01
    相关资源
    最近更新 更多