Home | Contact Us | Download | Support | Purchase | Shopping Cart | Products


Product List
  "Thanks for a great product and fantastic service."
U.K.
 
More
Testimonials

Deleting a Message

The following example demonstrates deleting a message, and then canceling pending deletes.

[C#]

POP3 pop = new POP3("127.0.0.1","dave@blah.com", "mypassword" );

//connect to the POP3 server
pop.Connect();
            
//delete the message
pop.Delete( 1 );
pop.Delete( 2 );

//commit the deletes
pop.CommitDeletes();

//decide you want to delete Message 3
pop.Delete( 3 );

//now change your mind
pop.CancelDeletes();

//Close the POP3 Connection
pop.Disconnect();

//done
Console.WriteLine( "done.");
Console.ReadLine( );



 

[VB.NET]

Dim pop As New POP3("127.0.0.1", "dave@blah.com", "mypassword")

'connect to the POP3 server
pop.Connect()

'delete the message
pop.Delete(1)
pop.Delete(2)

'commit the deletes
pop.CommitDeletes()

'decide you want to delete Message 3
pop.Delete(3)

'now change your mind
pop.CancelDeletes()

'Close the POP3 Connection
pop.Disconnect()

'done
Console.WriteLine("done.")
Console.ReadLine()




 

 



The box is not shipped. aspNetPOP3 is a downloadable product.