ikvk / imap_tools

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

keyword parameter error? #205

Closed Vinnybrunn00 closed 1 year ago

Vinnybrunn00 commented 1 year ago

I'm doing some tests on the API and I realized that I can't use the keyword parameter in the fetch() function, could you give me examples of how to use it, I've tried several ways...

unsuccessful example:

with MailBox('imap.gmail.com').login(USERNAME, PASSWORD) as inbox:
    for msg in inbox.fetch(AND(keyword=['github', 'python'])):
        from_ = msg.from_
        print(from_)

I already tested with all API operators: AND, NOT, OR, A, but I get no response using this parameter.

ikvk commented 1 year ago

Greet.

Special for you: https://github.com/ikvk/imap_tools/blob/master/examples/keyword_criteria.py :D