ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > ZennoPoster Class : BulkMailDownload Method |
Type: System.String
The login for mail (usualy your email address).
Type: System.String
The password for mail.
Type: System.String
The mail server. Default value is blank, ZennoPoster will try to determine your the settings.
Type: System.Int32
The server port. Default value is 143
Type: System.Boolean
true if use SSL; otherwise, false. Default value is true
Type: ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol
IMAP or POP3. Default value is IMAP.
Type: System.Int32
If message older than specified amount of hours will not be returned. Default value is 2 hours
Type: System.Int32
Max count of messages. Default value is 100.
Type: System.Boolean
true if remove messages; otherwise, false. Default value is false.
Type: System.String
The login for mail (usualy your email address).
Type: System.String
The password for mail.
Type: System.String
The mail server. Default value is blank, ZennoPoster will try to determine your the settings.
Type: System.Int32
The server port. Default value is 143
Type: System.Boolean
true if use SSL; otherwise, false. Default value is true
Type: ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol
IMAP or POP3. Default value is IMAP.
Type: System.Int32
If message older than specified amount of hours will not be returned. Default value is 2 hours
Type: System.Int32
Max count of messages. Default value is 100.
Type: System.Boolean
true if remove messages; otherwise, false. Default value is false.
Type: System.Tuple
tuple.Item1 - sibject, tuple.Item2 - from, tuple.Item3 - html message with headers, tuple.Item4 - text message with headers
// download all messages from gmail via IMAP Tuple<string, string, string, string>[] allMails; allMails = ZennoPoster.BulkMailDownload("[email protected]", "ххххххх", "imap.gmail.com", 993, true, ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.IMAP, 24*100, 20, false); // 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 }
// download all messages from gmail with auto settings detection for last 100 days. Tuple<string, string, string, string>[] allMails; allMails = ZennoPoster.BulkMailDownload("[email protected]", "хххххххххх", lastHours: 24*100); // 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 }
// download all messages from yandex via POP3 and add results to the table Tuple<string, string, string, string>[] allMails; allMails = ZennoPoster.BulkMailDownload("[email protected]", "ххххххххххх", "pop.yandex.ru", 995, true, ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.POP3, 24*100, 20, false); // loop fo all messages foreach(Tuple<string, string, string, string> tuple in allMails) { // adding messages to the table called Tabl1 // tuple.Item1 - sibject, tuple.Item2 - from, tuple.Item3 - html message, tuple.Item4 - text message List<string> tmp = new List<string>(); tmp.Add(tuple.Item1); tmp.Add(tuple.Item2); tmp.Add(tuple.Item3); tmp.Add(tuple.Item4); project.Tables["Tabl1"].AddRow(tmp); }
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven