// download all messages from gmail via IMAP
Tuple<string, string, string, string>[] allMails;
allMails = ZennoPoster.BulkMailDownload("
[email protected]",
"1256398ssd", "imap.gmail.com", 993, true,
ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.IMAP, 24*100, 20, true);
string fname = String.Concat( project.Directory,"\\mail.txt");
// Write the string to a file.
System.IO.StreamWriter file = new System.IO.StreamWriter(fname);
// loop fo all messages
foreach(Tuple<string, string, string, string> tuple in allMails)
{
// TODO Something useful with messages
// tuple.Item1 - sibject, tuple.Item2 - from, tuple.Item3 - html message, tuple.Item4 - text message
file.WriteLine(tuple.Item3);
}
file.Close();
ну вот как то так. Только под свою почту настройте код.