Chapter 9 PowerDynamo Mail Support


Deleting mail

You can use either the Delete method of the Retrieve method to delete mail objects.

The Delete method allows you to delete a specific mail piece from the server, while the Retrieve method marks a mail piece for deletion as soon as it has been retrieved from the server. In either case the deletion occurs when you disconnect from the POP3 server.

This example retrieves all mail pieces from the mail server and marks them for deletion.

<!--SCRIPT 
mlist = new MailList ("mailsrc.sybase.com", "dynamo7", "dynamo", "dynamo7@mailsrc.sybase.com");
num = mlist.count
document.WriteLn("There are " + num + " messages in the mail box");
for (i in mlist) {
inPiece=mlist[i];
inPiece.Retrieve(true);
document.WriteLn( "body: " + inPiece.body );
document.WriteLn( "sender: " + inPiece.sender );
}
mlist.Disconnect();
-->

 


Copyright © 1999 Sybase, Inc. All rights reserved.