By reporting abuse, a moderator will be asked to review the content of this interaction to take further action, if necessary.
Long story short, search is challenging for generic IMAP accounts. It’s probably not the answer you were hoping for, but hopefully it gives you a good idea of the challenges we are facing and the tradeoffs we must make as a small company who wants to provide a feature-rich application that‘s also cost-effective (both for us and our customers). An IMAP extension we know that can significantly improve search is SEARCH=FUZZY: https://tools.ietf.org/html/rfc6203 Unfortunately few independent email providers support it, at least by default. Some providers run installations of Dovecot that support SEARCH=FUZZY but those are rare. Dovecot is the most popular IMAP software. It supports SEARCH=FUZZY since version 2.1, but the extension must be manually enabled: https://imapwiki.org/Specshttps://doc.dovecot.org/configuration_manual/protocols/imap_server/https://doc.dovecot.org/configuration_manual/fts/ These links are the relevant documentation pages you could send to your hosting provider as reference.
Zach Sylvester
import imaplib import pprint import timeit imap_host = 'mail.example.com' imap_user = 'email@email.com' imap_pass = 'password for email' # connect to host using SSL imap = imaplib.IMAP4_SSL(imap_host) imap.login(imap_user, imap_pass) def imapconnection(): imap.select('Inbox') tmp, data = imap.search(None,'FROM' , 'emailtosearchfor@gmail.com') for num in data[0].split(): tmp, data = imap.fetch(num, '(RFC822)') #print('Message: {0}\n'.format(num)) #pprint.pprint(data[0][1]) break #save the execution time to a list execution_time_list = [] i = 0 while i < 100: execution_time = timeit.timeit(imapconnection, number=1) execution_time_list.append(execution_time) i += 1 #print the average execution time from the list print(sum(execution_time_list)/len(execution_time_list)) imap.close()
imap = imaplib.IMAP4_SSL(imap_host)
imap = imaplib.IMAP4(imap_host) imap.starttls()
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add noreply@smartertools.com to your trusted senders list in your email software.
A code was sent to the recovery email address. Please provide the 6-digit code.
A code can be retrieved from your authentication app. Please provide the 6-digit code.
An email was sent to your recovery email address. If you need further assistance, please contact your system admin.
Passkeys let you sign in quickly and securely using your fingerprint, face, or device PIN. No password needed!