none
Exchange 2007 在使用javamail search()方法时 接受汉字命令时报A4的错 RRS feed

  • 问题

  • 错误如下:

    DEBUG: setDebug: JavaMail version 1.5.0
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle]
    DEBUG IMAP: mail.imap.fetchsize: 16384
    DEBUG IMAP: mail.imap.ignorebodystructuresize: false
    DEBUG IMAP: mail.imap.statuscachetimeout: 1000
    DEBUG IMAP: mail.imap.appendbuffersize: -1
    DEBUG IMAP: mail.imap.minidletime: 10
    DEBUG IMAP: trying to connect to host "10.254.xx.xx", port 143, isSSL false
    * OK The Microsoft Exchange IMAP4 service is ready.
    A0 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI STARTTLS IDLE NAMESPACE LITERAL+
    A0 OK CAPABILITY completed.
    DEBUG IMAP: AUTH: NTLM
    DEBUG IMAP: AUTH: GSSAPI
    DEBUG IMAP: protocolConnect login, host=10.254.xx.xx, user=yanwb@xx.com, password=<non-null>
    DEBUG IMAP: AUTHENTICATE NTLM command trace suppressed
    DEBUG NTLM: type 1 message: 4E 54 4C 4D 53 53 50 00 01 00 00 00 03 A2 00 00 00 00 00 00 29 00 00 00 09 00 09 00 20 00 00 00 6C 6F 63 61 6C 68 6F 73 74 
    DEBUG NTLM: type 3 message: 4E 54 4C 4D 53 53 50 00 03 00 00 00 18 00 18 00 74 00 00 00 18 00 18 00 8C 00 00 00 00 00 00 00 40 00 00 00 22 00 22 00 40 00 00 00 12 00 12 00 62 00 00 00 00 00 00 00 A4 00 00 00 01 82 00 00 79 00 61 00 6E 00 77 00 62 00 40 00 43 00 4D 00 53 00 54 00 45 00 53 00 54 00 2E 00 63 00 6F 00 6D 00 6C 00 6F 00 63 00 61 00 6C 00 68 00 6F 00 73 00 74 00 74 C3 1D 76 D0 65 2A 88 17 B9 D7 12 9F 45 DD 1B 31 A0 BE 80 13 E5 F3 CF 91 2C 78 A6 B8 47 7A D6 C0 4A 0A 8D D6 AE B9 20 95 5E DE 4C 01 21 58 7E 
    DEBUG IMAP: AUTHENTICATE NTLM command result: A1 OK AUTHENTICATE completed.
    A2 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI STARTTLS IDLE NAMESPACE LITERAL+
    A2 OK CAPABILITY completed.
    DEBUG IMAP: AUTH: NTLM
    DEBUG IMAP: AUTH: GSSAPI
    DEBUG IMAP: connection available -- size: 1
    A3 SELECT INBOX
    * 1100 EXISTS
    * 0 RECENT
    * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
    * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
    * OK [UNSEEN 1090] Is the first unseen message
    * OK [UIDVALIDITY 1611] UIDVALIDITY value
    * OK [UIDNEXT 17682] The next unique identifier value
    A3 OK [READ-WRITE] SELECT completed.
    A4 SEARCH CHARSET UTF-8 SUBJECT {15+}
    我的意思是 ALL
    A4 BAD Command Argument Error. 11
    javax.mail.MessagingException: A4 BAD Command Argument Error. 11;
      nested exception is:
    	com.sun.mail.iap.BadCommandException: A4 BAD Command Argument Error. 11
    	at com.sun.mail.imap.IMAPFolder.search(IMAPFolder.java:1881)
    	at xx.xx.xx.xx.mail.BaseMailReceiver.searchMail(BaseMailReceiver.java:1375)
    
    后台使用的是javaMail  的search()方法,求解

    2015年11月24日 7:20

全部回复

  • 你好,

    建议你到Exchange发展论坛提问,关于Exchange与其他计算机语言的可编程性,他们有更专业的知识,你可以得到及时有效的解决方案。

    谢谢!


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Niko Cheng
    TechNet Community Support

    2015年11月25日 6:14
    版主