imap_ssl.search one letter name

Discussion in 'Python' started by Linh Lee, Aug 23, 2022.

Tags:
  1. Linh Lee

    Linh Lee New Member

    Joined:
    Aug 18, 2022
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Female
    Location:
    San Francisco
    Code:
    resp_code, mails = imap_ssl.search(None, '(FROM "a")')
    I want to search emails from a specific one letter named user, "a".
    Example:
    <a@xxxxx.com>
    <a@xxxxxx.com>


    Problem is, search results cause all users with an "a" as part of there name to be returned.
    Example:
    jane@xxxxx.com
    aaron@xxxxxx.com

    Any way to isolate the search to one letter name?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice