gpt4 book ai didi

Javamail A5 错误命令

转载 作者:行者123 更新时间:2023-11-29 05:46:48 27 4
gpt4 key购买 nike

我在巴西主机 (uol.com.br) 的服务器中有一个邮件帐户。此帐户用于测试,收件箱中有 7.000 条消息。当我通过 java 邮件和 setDebug(true) 连接时,消息不会返回并显示此消息:

03-22 14:44:07.305: I/System.out(5524): A1 OK User logged in
03-22 14:44:07.320: I/System.out(5524): A2 CAPABILITY
03-22 14:44:07.435: I/System.out(5524): * CAPABILITY IMAP4 IMAP4rev1 QUOTA UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT
03-22 14:44:07.435: I/System.out(5524): A2 OK Completed
03-22 14:44:07.500: I/System.out(5524): A3 LIST "" "%"
03-22 14:44:07.835: I/System.out(5524): * LIST (\HasNoChildren) "." "INBOX"
03-22 14:44:07.850: I/System.out(5524): * LIST (\HasNoChildren) "." "Quarentena"
03-22 14:44:07.870: I/System.out(5524): * LIST (\HasNoChildren) "." "Drafts"
03-22 14:44:07.885: I/System.out(5524): * LIST (\HasNoChildren) "." "Sent Messages"
03-22 14:44:07.925: I/System.out(5524): * LIST (\HasNoChildren) "." "Deleted Messages"
03-22 14:44:07.950: I/System.out(5524): A3 OK Completed (0.000 secs 6 calls)
03-22 14:44:07.990: I/System.out(5524): DEBUG: connection available -- size: 1
03-22 14:44:07.995: I/System.out(5524): A4 SELECT INBOX
03-22 14:44:08.130: I/System.out(5524): * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
03-22 14:44:08.145: I/System.out(5524): * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
03-22 14:44:08.160: I/System.out(5524): * 7245 EXISTS
03-22 14:44:08.170: I/System.out(5524): * 1 RECENT
03-22 14:44:08.180: I/System.out(5524): * OK [UNSEEN 7243]
03-22 14:44:08.190: I/System.out(5524): * OK [UIDVALIDITY 1208433603]
03-22 14:44:08.235: I/System.out(5524): * OK [UIDNEXT 10125]
03-22 14:44:08.235: I/System.out(5524): A4 OK [READ-WRITE] Completed
03-22 14:44:21.555: I/System.out(5524): A5 SEARCH UNSEEN ALL
03-22 14:44:23.910: I/System.out(5524): A5 BAD Unsupported command.

这是设置标志的代码的一部分。在 gmail 中,此代码适用于收件箱文件夹中的 100 封邮件

public Message[] getInboxMessages() {
Message[] messages = null;
try {

Flags f1 = new Flags(Flags.Flag.SEEN);
FlagTerm notseen = new FlagTerm(f1, false);

messages = mInboxFolder.search(notseen);

} catch (NoSuchProviderException e) {
Log.w(TAG, e.getMessage());

} catch (MessagingException e) {
Log.w(TAG, e.getMessage());
}
return messages;
}

最佳答案

服务器坏了。它似乎没有正确支持 IMAP 协议(protocol)。向服务器供应商报告错误。

如果您需要解决服务器错误,则需要避免使用该“搜索”命令。您可以获取所有消息并跳过标记为 SEEN 的消息。

关于Javamail A5 错误命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15577165/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com