Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

New Post: How get all messages from all folders?

$
0
0
Hi Ivan,

there are multiple ways for fetching the messages.

You can configure the client to always fetch the messages once you access Messages:
client.Behavior.AutoPopulateFolderMessages = true; 
This is not a good practice as it gets you less control about what and how you download. A better way is to use the Download or Search method:
/* .. Init client, authenticate .. */        
/* .. folder = any folder .. */  
folder.Messages.Download(/* optional, add filter, change download mode, limit number of messages */)
/* .. Init client, authenticate .. */        
/* .. folder = any folder .. */  
var messages = folder.Search(/* optional, add filter, change download mode, limit number of messages */)
More details can be found in the documentation:
Greets,

Pavel

Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>