Search All Forums
Dart Home | PowerTCP Mail for .NET | Custom Development Reply | PowerTCP Mail for .NET Topics | Forums   
AuthorForum: PowerTCP Mail for .NET
Topic: How to mark imap messages for deletion using imports dart.mail

From: India
Posts: 4
Member Since: 04/13/15
posted September 18, 2015 5:28 AM

imports dart.mail
Dim imap1 As New Imap


imap1.Session.RemoteEndPoint = New Dart.Mail.IPEndPoint(domainname, Imap.GetDefaultPort(imap1.Session)) 'myServer, Imap.GetDefaultPort(imap1.Session))

 imap1.Session.Username = username
 imap1.Session.Password = password
 imap1.SelectedMailbox = imap1.Mailboxes("INBOX")

 Dim messages As ImapMessage() = imap1.SelectedMailbox.ToArray()

If (messages.Count > 0) Then
For Each msg As ImapMessage In messages
// do something

  msg.deleted=true //giving error
 now i want to mark each message for deletion

// messages which are marked for deletion only should be purgerd.
msg.purge() // not working

end if

end try

how to mark each imap message for deletion.once the for loop exits i want to purge the marked deleted messages.Please help me in this aspect.
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 436
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted September 18, 2015 3:51 PM

The ImapMessage.Update() method is used to set or remove flags, such as the delete flag:

See the ImapMessage.Deleted property documentation for more information:

From: India
Posts: 4
Member Since: 04/13/15
posted September 30, 2015 7:28 AM

Thank you Jamie Powell.

Its working :)
Reply | PowerTCP Mail for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX