Archived Forum Post

Index of archived forum posts

Question:

Imap search and fetch sequence

Jun 11 '12 at 12:40
  1. I know that I need to use the below code to search the email based on criteria.

messageSet = imap.Search(SearchCriteria, fetchUids)

bundle = imap.FetchHeaders(messageSet)

  1. And I also know that I need to use below code to load the specified no of email.

bundle = imap.FetchSequenceHeaders(startseq, numtofetch)

Here I want to combine 1 and 2 together. Means I want read the specified no of Email based on the above searching criteria. How can I do that?


Answer

Fetch 1st N Headers of Search Results

ASP: http://www.example-code.com/asp/imap_fetchFirstN.asp
SQL Server: http://www.example-code.com/sql/imap_fetchFirstN.asp
C#: http://www.example-code.com/csharp/imap_fetchFirstN.asp
C++: http://www.example-code.com/vcpp/imap_fetchFirstN.asp
Objective-C: http://www.example-code.com/objc/imap_fetchFirstN.asp
IOS: http://www.example-code.com/ios/imap_fetchFirstN.asp
PowerShell: http://www.example-code.com/powershell/imap_fetchFirstN.asp
MFC: http://www.example-code.com/mfc/imap_fetchFirstN.asp
C: http://www.example-code.com/C/imap_fetchFirstN.asp
Delphi: http://www.example-code.com/delphi/imap_fetchFirstN.asp
Visual FoxPro: http://www.example-code.com/foxpro/imap_fetchFirstN.asp
Java: http://www.example-code.com/java/imap_fetchFirstN.asp
Androidâ„¢: http://www.example-code.com/android/imap_fetchFirstN.asp
Perl: http://www.example-code.com/perl/imap_fetchFirstN.asp
PHP: http://www.example-code.com/php/imap_fetchFirstN.asp
PHP: http://www.example-code.com/phpExt/imap_fetchFirstN.asp
Python: http://www.example-code.com/python/imap_fetchFirstN.asp
Ruby: http://www.example-code.com/ruby/imap_fetchFirstN.asp
VB.NET: http://www.example-code.com/vbdotnet/imap_fetchFirstN.asp
Visual Basic: http://www.example-code.com/vb/imap_fetchFirstN.asp
VBScript: http://www.example-code.com/vbscript/imap_fetchFirstN.asp