【问题标题】:Does IMAP search work on outlook.comIMAP 搜索是否适用于 outlook.com
【发布时间】:2014-11-06 08:46:21
【问题描述】:

我是 IMAP 新手。

我正在尝试从 Outlook.com 提取邮件,我已在我的电子邮件客户端中配置了 Outlook.com IMAP 设置。我可以连接并从 outlook.com 获取消息。

但是当我尝试使用像

这样的搜索词来获取消息时

我正在使用 Java 邮件包。

IMAPStore store = getStore(serverName, userName, password, port);
IMAPFolder inboxFolder = (IMAPFolder) store.getFolder("INBOX");

SearchTerm[] searchTerms = new SearchTerm[4];

Address address = new InternetAddress("search_email_address");
SearchTerm toTerm = new RecipientTerm(Message.RecipientType.TO, address);
SearchTerm ccTerm = new RecipientTerm(Message.RecipientType.CC, address);
SearchTerm bccTerm = new RecipientTerm(Message.RecipientType.BCC, address);
SearchTerm fromStringTerm = new FromStringTerm(searchEmail);

searchTerms[0] = toTerm;
searchTerms[1] = ccTerm;
searchTerms[2] = bccTerm;
searchTerms[3] = fromStringTerm;

OrTerm orTerms = new OrTerm(searchTerms);

inboxFolder.search(orTerms);

我正在尝试在 IMAP 文件夹中使用上述搜索词搜索邮件,但我收到的邮件为零。

这里有任何API限制或代码中的任何问题,请指导我

谢谢 拉梅什

【问题讨论】:

  • 您能显示实际发送和接收的 IMAP 请求和响应吗?
  • 您必须显示对 Folder.search() 的调用,如何构造 search() 的参数,以及理想情况下产生的 IMAP 命令。
  • @legoscia,@arnt 感谢您的回复,我已经更新了我的代码。请立即查看

标签: email outlook imap outlook.com


【解决方案1】:

看看“IMAP 搜索是否可以在 Outlook.com 上工作”这个问题,我可以说:是的。

我正在使用imapsync 从outlook.com 同步到其他邮箱,它可以正常工作。在幕后 imapsync 使用 IMAP 搜索。

outlook.com 宣布的 IMAP 功能有:

IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+ AUTH

也许这对某人有帮助。这也可以解释为什么某些搜索关键字可能有效,也可能无效。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-15
    • 2015-12-13
    • 2015-03-18
    • 1970-01-01
    • 2012-09-20
    • 2020-03-04
    • 1970-01-01
    • 2011-02-12
    相关资源
    最近更新 更多