Deleting all messages |
Upon disconnecting from a POP server you can optionally delete any messages retrieved from the account mailbox during your session by setting the DeleteMessages property prior to retrieving any messages from the mailbox.
Example
[C#] myPop.Connect(); // set delete flag myPop.DeleteMessages = true; IEnumerator e = myPop.GetMessages(); while(e.MoveNext()) { EmailMessage message = (EmailMessage)e.Current; // process email messages }
[Visual Basic] myPop.Connect() ' set delete flag myPop.DeleteMessages = True Dim e As IEnumerator = myPop.GetMessages() Dim message As EmailMessage = Nothing While (e.MoveNext()) message = e.Current ' process email messages End While
|