Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6721589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:20:51+00:00 2026-05-26T09:20:51+00:00

I am working on an imap email client. I have a search function, which

  • 0

I am working on an imap email client.
I have a search function, which is works perfectly.
It returns a custom EmailHeaderInfo List.

This EmailheaderInfo Class contains the next properties:
UID, Subject, From(System.Net.Mail.MailAdress, its contain displayname too), Date(Receive),Size, Flag(to check read/unread status) and Attachment(To check email has attchment or not). I store everything in this class with the correct charset.

In this search function I use Imap SEARCH command to get uids, and with this uids
I use the following FETCH command:

UID FETCH ” + uids[i] + ” (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (Received From Subject Content-Type)])

After each Fetch I get size and flag with regexp, and other information with parse header.

At the moment to list 250 emails takes 8 sec.

I really curious for other people opinion or suggestion about how to make it faster.

Update:

I run Fetch command with a messagetset(I made a messageset from the SEARCH command result).

Now to list ~450 mails takes 1-2 sec. Finally it’s really fast.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:20:51+00:00Added an answer on May 26, 2026 at 9:20 am

    First you need to check messages info return time. How fast server returns all info without parsing.
    Then you can see how much time you spend …

    Off topic note:
    Subject,From consist strings, as per IMAP any string can be represented as string literal.
    So you need to be prepared to receive them.
    This means command can expand to multiple lines, you need to read more lines to get complete data …
    RFC 3501 string literal will describe it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an IMAP client using java mail. We currently have a
Is there any working IMAP client library implemented in Erlang which can query IMAP
I am working on Email client application. I have written one sample program for
I am creating Email client using JavaMail API. Everything is working fine like I
I am working on a mail client Application for downloading gmail emails, which uses
I have been working at home on Gmail-Imap-Api on the weekend. It was working
I have a ruby client that connects to an exchange server using IMAP &
I have created an IMAP-Server (I use the component from LumiSoft). It is working
Working on a project at the moment and we have to implement soft deletion
Working with python interactively, it's sometimes necessary to display a result which is some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.