ImapSearchParameter.Arrived(DateTime Since,DateTime before) is not working Properly?

+1 vote
asked Dec 2, 2010 by Reddy (260 points)
edited Mar 24, 2011

Hi all,

We are using Rebex.mail.dll to fetch the emails, We have to fetch the emails with specific datetime range.So We are using ImapSearchPaarmeter.Arrived(DateTime since,DateTime before) but it is only fetching the based on Date not the DateTime.

Please give me some suggestions to fetch the emails based on DateTime not Date.

thanks....

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Dec 2, 2010 by Lukas Pokorny (101,990 points)
edited Dec 2, 2010
 
Best answer

Unfortunately, the IMAP protocol itself only supports searching based on date. That's why the Time part of DateTime argument is ignored.

If you need to fetch emails based on DateTime instead of Date, try the following:

  1. Use ImapSearchParameter.Arrived and Imap.Search method to search based on Date.
  2. Check the date of each message in the collection returned by Imap.Search. Only fetch the messages whose date is greater than since and less than before.
...