ikvk / imap_tools

Work with email by IMAP
Apache License 2.0
717 stars 83 forks source link

imaplib.error: SEARCH command error: BAD [b'invalid command or parameters'] #192

Closed hadoop-sc closed 1 year ago

hadoop-sc commented 2 years ago

I executed the following code with reference to the example and reported an error. with MailBox('imap.qiye.aliyun.com').login(email_addr, email_pwd) as mailbox: for msg in mailbox.fetch(AND(subject='test')): print(msg.uid, msg.subject) error: imaplib.error: SEARCH command error: BAD [b'invalid command or parameters']

python env: 3.6.5 or 3.10.2

ikvk commented 2 years ago

Try the same query on another mail server. Seems that your server not support some search cases

ikeepo commented 1 year ago

same question, any way how to solve this?

ikvk commented 1 year ago

Email servers may not support all search criterias

same question, any way how to solve this?

Tendx commented 1 year ago

阿里企业邮不支持高级的搜索语法,已经开工单问过。'BAD' response: invalid command or parameters”返回的都是不支持的。

搜索的时候正好看到这里有问,顺便回答一下。。